Missing values treatment in model building steps in R


#1

table(is.na(train)) is not giving the appropriate output.
False=390732 with no True values and
colSums(is.na(train)) is giving 0 for all columns.


#2

In R, NA’s will be counted by

> sum(is.na(df)) - Overall rows with NA’s

> colSums(is.na(df)) - Column-wise count of NA’s

If the value is empty then it will not be included in the count.

> summary(df) - will help in both cases of NA’s and empty values