September 2017
Beginner to intermediate
560 pages
25h 18m
English
Read data and replace missing values:
> dat <- read.csv("missing-data.csv", na.strings = "") > dat$Income.imp.mean <- ifelse(is.na(dat$Income), mean(dat$Income, na.rm=TRUE), dat$Income)
After this, all the NA values for Income will be the mean value prior to imputation.
Read now
Unlock full access