Learn R Programming

missForestPredict (version 1.0)

produce_NA: Produces a dataframe with missing values

Description

Produces a dataframe with missing values. For each variable, a random sample of observations of size proportion * nrow(x) will be set to NA.

Usage

produce_NA(x, proportion = 0.1)

Value

dataframe with missing values.

Arguments

x

a dataframe

proportion

proportion of missing values to be produced; a vector of size ncol(x) or a single value to be applied to all variables in the dataframe.