impute_mean | R Documentation |
Impute the mean value into a vector with missing values
impute_mean(x) ## Default S3 method: impute_mean(x) ## S3 method for class 'factor' impute_mean(x)
x |
vector |
vector with mean values replaced
vec <- rnorm(10) vec[sample(1:10, 3)] <- NA impute_mean(vec)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.