set-prop-n-miss | R Documentation |
Set a proportion or number of missing values
set_prop_miss(x, prop = 0.1)
set_n_miss(x, n = 1)
x |
vector of values to set missing |
prop |
proportion of values between 0 and 1 to set as missing |
n |
number of values to set missing |
vector with missing values added
vec <- rnorm(5)
set_prop_miss(vec, 0.2)
set_prop_miss(vec, 0.4)
set_n_miss(vec, 1)
set_n_miss(vec, 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.