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

View source: R/gen.mcar.R

gen.mcarR Documentation

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

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

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


RfEmpImp documentation built on Oct. 20, 2022, 9:06 a.m.