Description Usage Arguments Value Examples
Randomly amputes data (MCAR).
1 | amputeData(data, perc = 0.1, cols = names(data))
|
data |
The data to be amputed |
perc |
A scalar. The percentage (0-1) to be amputed. |
cols |
The columns to ampute. |
The same dataset with random values in cols
set to NA.
1 2 3 4 5 |
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1 5.1 3.5 1.4 0.2 setosa
2 4.9 3.0 1.4 0.2 setosa
3 4.7 3.2 1.3 0.2 setosa
4 4.6 3.1 1.5 0.2 setosa
5 5.0 3.6 1.4 0.2 setosa
6 5.4 3.9 1.7 0.4 setosa
7 4.6 3.4 1.4 0.3 setosa
8 5.0 3.4 1.5 0.2 setosa
9 4.4 2.9 1.4 0.2 setosa
10 4.9 3.1 1.5 0.1 setosa
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1: 5.1 3.5 NA 0.2 <NA>
2: 4.9 3.0 1.4 0.2 setosa
3: 4.7 3.2 1.3 0.2 <NA>
4: NA 3.1 NA 0.2 setosa
5: 5.0 3.6 NA 0.2 setosa
6: 5.4 3.9 1.7 0.4 setosa
7: 4.6 3.4 NA NA <NA>
8: NA 3.4 1.5 0.2 setosa
9: 4.4 NA 1.4 0.2 <NA>
10: 4.9 3.1 1.5 0.1 setosa
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.