Randomized replacement of values by NA
.
Usage
replace_na(v, percentage = 0.05, seed = NULL)
Arguments
- v
(any
)
Vector of any type.
- percentage
(proportion
)
Value between 0 and 1 defining
how much of the vector shall be replaced by NA
. This number
is randomized by +/- 5% to have full randomization.
- seed
(numeric
)
Seed to use for reproducible random number generation.
Value
The input vector v
where a certain number of values are replaced by NA
.