Impute the median value into a vector with missing values
Impute the median value into a vector with missing values
impute_median(x) ## Default S3 method: impute_median(x) ## S3 method for class 'factor' impute_median(x)
x |
vector |
vector with median values replaced
vec <- rnorm(10) vec[sample(1:10, 3)] <- NA impute_median(vec)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.