+3 votes
in R Language by
Write a function in R language to replace the missing value in a vector with the mean of that vector.

1 Answer

0 votes
by

mean impute <- function(x) {x [is.na(x)] <- mean(x, na.rm = TRUE); x}

Related questions

+3 votes
asked Jul 28, 2019 in R Language by Aarav2017
+3 votes
asked Jul 28, 2019 in R Language by Aarav2017
...