R language gap filling value

R in the language,

Characteristics imputeMissings packet is, if the null value is numeric, using median place, if the character type, use mode value instead.

imputeMissing, the package is required imputeMissings.

Use
{r} install.packages("imputeMissings")download

library(imputeMissings)

filename = read.csv('lifeExpectancyData.csv')

head(filename$Country)

is.na(filename)

filename<-impute(filename)

colSums(is.na(filename))

Description:

  • Wherein the gap value used to check is.na

  • impute values ​​used to populate

References:

imputeMissing

Guess you like

Origin www.cnblogs.com/zhichun/p/12045672.html