amputeData {miceRanger} | R Documentation |
amputeData
Description
Randomly amputes data (MCAR).
Usage
amputeData(data, perc = 0.1, cols = names(data))
Arguments
data |
The data to be amputed |
perc |
A scalar. The percentage (0-1) to be amputed. |
cols |
The columns to ampute. |
Value
The same dataset with random values in cols
set to NA.
Examples
data(iris)
head(iris,10)
ampIris <- amputeData(iris)
head(ampIris,10)
[Package miceRanger version 1.5.0 Index]