Learn R Programming

DMwR2 (version 0.0.2)

centralImputation: Fill in NA values with central statistics

Description

This function fills in any NA value in all columns of a data frame with the statistic of centrality (given by the function centralvalue()) of the respective column.

Usage

centralImputation(data)

Arguments

data
The data frame

Value

A new data frame with no NA values

References

Torgo, L. (2016) Data Mining using R: learning with case studies, second edition, Chapman & Hall/CRC (ISBN-13: 978-1482234893).

http://ltorgo.github.io/DMwR2

See Also

knnImputation, centralValue, complete.cases, na.omit

Examples

Run this code
data(algae,package="DMwR2")
cleanAlgae <- centralImputation(algae)
summary(cleanAlgae)

Run the code above in your browser using DataLab