Write a custom function which will replace all the missing values in a vector with the mean of values.
Answer / Saurabh Vishnoi
```Rnncreate_mean_imputation_function <- function(x) {n mean_value <- mean(x, na.rm = TRUE)n x[is.na(x)] <- mean_valuen return(x)n}n```
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain how R commands are written?
What is scan() in r?
What are packages in r?
Which function is used to create a histogram visualisation in r programming language?
Explain how you can create a table in r without external file?
Write a function in R language to replace the missing value in a vector with the mean of that vector?
What are the steps involved in building and evaluating a linear regression model in r?
What is an arbitrary function in r?
Explain the usage of which() function in r language?
What are r data types?
What does not ‘r’ language do?
How can we create a table using R language without using external files?