powered by
Generate missing (completely at random) cells in a data set
gen.mcar(df, prop.na = 0.2, warn.empty.row = TRUE, ...)
A data frame or matrix containing generated missing cells.
Input data frame or matrix.
Proportion of generated missing cells. The default is prop.na = 0.2.
prop.na = 0.2
Show a warning if empty rows were present in the output data set.
Other parameters (will be ignored).
Shangzhi Hong
data("mtcars") mtcars.mcar <- gen.mcar(mtcars, warn.empty.row = FALSE)
Run the code above in your browser using DataLab