Description Usage Arguments Value Examples
allows adding NA values to a data frame, selecting the columns and the proportion of desired NAs.
1 | insert_na(.dataset, columns, .p = 0.01, seed = 123)
|
.dataset |
data frame. |
columns |
vector that indicates the name of the columns where the NA values will be added, in the format: c("X1", "X2") for variables X1, X2. |
.p |
value between 0 and 1, indicating the proportion of NA values that will be added. |
seed |
random number seed. |
the original data frame, but with the NA values added in the indicated columns.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.