Randomly amputes data (MCAR).
amputeData(data, perc = 0.1, cols = names(data))
The data to be amputed
A scalar. The percentage (0-1) to be amputed.
The columns to ampute.
The same dataset with random values in cols set to NA.
cols
# NOT RUN { data(iris) head(iris,10) ampIris <- amputeData(iris) head(ampIris,10) # }
Run the code above in your browser using DataLab