Categories

Jul 28, 2019 in R Language

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

1 Answer

Jul 28, 2019

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

Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

Madanswer
Jul 28, 2019 in R Language
Jul 28, 2019 in R Language
Jul 28, 2019 in R Language
...