Login
Remember
Register
Ask a Question
Write a function in R language to replace the missing value in a vector with the mean of that vector.
+3
votes
asked
Jul 28, 2019
in
R Language
by
Aarav2017
Write a function in R language to replace the missing value in a vector with the mean of that vector.
#r-language
#r-programming
#r-course
#r-tutorial
#r-question-answer
#r-interview-question
#r-basics
#r-test
#what-is-r
#learn-r
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jul 28, 2019
by
SakshiSharma
mean impute <- function(x) {x [is.na(x)] <- mean(x, na.rm = TRUE); x}
...