Description Usage Arguments Details Value See Also
Inserts NAs throughout a data frame at random
1 |
x |
Data frame or vector. |
na_prob |
the probability of missing values per variable in the data frame. Default is 0.1, i.e. each variable will have 10% NAs. |
cols |
numeric. In which columns to insert NAs. Default is all columns. To leave out the first column, use cols = -1. |
symm |
logical. whether the missing values should be inserted symmetrically, i.e., whether each column should contain the same number of NAs. |
Function is a modified version of 'r_na' and r_na_vector' from the 'wakefield' package. It adds the functionality to add NAs asymmetrically to a data frame, meaning the number of NAs per column will vary.
Returns the original data frame with NAs inserted. The default settings returns a data frame with data missing completely at random.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.