0
Yet Another Person's Query on the R Titanic Survivors Module Coding Problem:
The question: You want to understand how the class of the ticket impacted the survival rate. For that, you need to find and output the mean class value for the passengers who are adults (Age >= 18), grouped by the Survived column. (Data stored in CSV file). My problem: I don't understand where I went wrong with this: x <- read.csv('/usercode/files/titanic.csv') adults <- x[x$age >= 18, ] print(tapply(adults$Pclass, adults$survived, mean)) Thanks for y'all's time and help!
3 Answers
0
Need to see the data in the titanic.csv file to fully understand what might be going wrong in your code..
0
Ah, it's fine, thank you though!
0
Sorry bro, i can't really help you