Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

Students also viewed these Databases questions

Question

1. How does a budget help control discretionary costs?

Answered: 1 week ago