0
titanic surviving test
i have a problem my output is logical(0) this is my code but i still dont what is the problem x <- x[x$age >= 18, ] res<-by(x$Pclass, x$Survived, mean) print(res)
3 Respostas
+ 1
Use tapply instead of by, and don't assign to res and don't use print, and also remember to read the csv file and assign it to x.
+ 1
It is Age with capital A. And, as already mentioned, try tapply()
+ 1
Lisa Yes, that's rigth with capital A.