November 2016
Beginner to intermediate
959 pages
43h 46m
English
Missing values reduce the representativeness of the sample, and furthermore, might distort inferences about the population. This recipe will focus on detecting missing values within the Titanic dataset.
You need to have completed the previous recipes by the Pclass attribute and Survived to a factor type.
In R, a missing value is noted with the symbol NA (not available), and an impossible value is NaN (not a number).
Perform the following steps to detect the missing value:
is.na function is used to denote which index of the attribute contains the NA value. Here, we apply it to the Age attribute first:
> is.na(train.data$Age)
is.na function indicates the missing value of the Age attribute. ...Read now
Unlock full access