gen.mcar: Generate missing (completely at random) cells in a data set

Description Usage Arguments Value Author(s) Examples

View source: R/gen.mcar.R

Description

Generate missing (completely at random) cells in a data set

Usage

1
gen.mcar(df, prop.na = 0.2, warn.empty.row = TRUE, ...)

Arguments

df

Input data frame or matrix.

prop.na

Proportion of generated missing cells. The default is prop.na = 0.2.

warn.empty.row

Show a warning if empty rows were present in the output data set.

...

Other parameters (will be ignored).

Value

A data frame or matrix containing generated missing cells.

Author(s)

Shangzhi Hong

Examples

1
2
data("mtcars")
mtcars.mcar <- gen.mcar(mtcars, warn.empty.row = FALSE)

RfEmpImp documentation built on July 2, 2020, 2:13 a.m.