[SOLVED] What's wrong in this code?
***Titanic Survivors*** You are working on the Titanic Survivors data set, which includes information on the passengers of the ship. The data is stored in a CSV file, which is already imported in the given code. 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. //////////////////////////////////////////////////// x <- read.csv('/usercode/files/titanic.csv') #your code goes here y <- x[x$Survived == 1, mean(x$Pclass)] z <- x[x$Survived == 0, mean(x$Pclass)] print(mean(y)) print(mean(z)) ////////////////////////////////////// https://code.sololearn.com/cNCjN1gN0NY3/?ref=app https://code.sololearn.com/c5RgUl0RAuwv/?ref=app