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

What is using all() and any()?

1 Answers  


What are functions of Random forest in R?

1 Answers  


What are applications of Predictive analysis in R?

1 Answers  


What do you understand by R cluster analysis?

1 Answers  


What is function in r?

1 Answers  


What is variance in r?

1 Answers  


How to remove all the objects?

1 Answers  


What is Descriptive analysis in R?

1 Answers  


Mention how you can produce co-relations and covariances?

1 Answers  


How would you fit a linear model over a scatter-plot?

1 Answers  


Why the stepaic()?

1 Answers  


Explain how to access list elements in r?

1 Answers  


Categories