impute

0th

Percentile

Replace Missing Values

Replaces missing values of a matrix or dataframe with the medians (what="median") or means (what="mean") of the respective columns.

Keywords
manip
Usage
impute(x, what = c("median", "mean"))
Arguments
x

A matrix or dataframe.

what

What to impute.

Value

A matrix or dataframe.

Aliases
  • impute
Examples
# NOT RUN {
x<- matrix(1:10, ncol=2)
x[c(1,3,7)] <- NA
print(x)
print(impute(x))
# }
Documentation reproduced from package e1071, version 1.7-3, License: GPL-2 | GPL-3

Community examples

Looks like there are no examples yet.