Question: Create a new R object named classAgeGroup ( not a new column in titanic ) using the if else if else setup within a for

Create a new R object named classAgeGroup (not a new column in titanic) using the if else if else setup within a for loop or using 1felse ) which: is equal to 0 if Age is 18,1 if Age is 18 and Pclass =1,2 if Age is 18 and Pclass =2, and 3 if Age is 18 and Pclass =3
Now create a new variable in the titanic dataset with the same setup as the variable you just created using the 1 felse() function. Tip: you may need to use nested calls to 1 felso()
Create a boxplot of Fare by classAgeGroup for the titanic data. Comment on your findings.
Create a boxplot of Age by the new variable you created in problem 3) for the titanic data. Comment on your findings.
 Create a new R object named classAgeGroup (not a new column

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!