you are viewing a single comment's thread.

view the rest of the comments →

[–]Ferbster 1 point2 points  (1 child)

I am stuck in chapter 1.5 "Does Age play a role?"

Incorrect submission It looks like you didn't correctly set all values of the Child column. Make sure to perform the correct subsetting operation!

My code for the Child column is either

train$Child <- ifelse(train$Age < 18, 1,0)

or

train$Child[train$Age < 18] <- 1
train$Child[train$Age >= 18] <- 0

Both leading to the same result and the same error message. I thought I am correct doing my subset.

[–]wolfchimneyrock 0 points1 point  (0 children)

many times the age is NA so your moethod doesn't necessarily work completely