Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Write a custom function which will replace all the missing values in a vector with the mean of values.



Write a custom function which will replace all the missing values in a vector with the mean of value..

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

Post New Answer

More R Programming Interview Questions

Explain how R commands are written?

1 Answers  


What is scan() in r?

1 Answers  


What are packages in r?

1 Answers  


Which function is used to create a histogram visualisation in r programming language?

1 Answers  


Explain how you can create a table in r without external file?

1 Answers  


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

1 Answers  


What are the steps involved in building and evaluating a linear regression model in r?

1 Answers  


What is an arbitrary function in r?

1 Answers  


Explain the usage of which() function in r language?

1 Answers  


What are r data types?

1 Answers  


What does not ‘r’ language do?

1 Answers  


How can we create a table using R language without using external files?

1 Answers  


Categories