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

▼ Show 1 Answer

0 votes

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

Learn More with Madanswer

Related questions

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