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

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