Learn R Programming

imputation (version 2.0.3)

meanImpute: Mean Imputation

Description

Fill missing values in a column with the mean of the column

Usage

meanImpute(x)

Arguments

x
a data frame or matrix where each row represents a different record

Examples

Run this code
x = matrix(rnorm(100),10,10)
  x.missing = x > 1
  x[x.missing] = NA
  meanImpute(x)

Run the code above in your browser using DataLab