Learn R Programming

RfEmpImp (version 2.1.8)

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

Description

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

Usage

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

Value

A data frame or matrix containing generated missing cells.

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).

Author

Shangzhi Hong

Examples

Run this code
data("mtcars")
mtcars.mcar <- gen.mcar(mtcars, warn.empty.row = FALSE)

Run the code above in your browser using DataLab