replacing the missing value of a vector with the mean value of that vector

0 votes

how to replacing the missing value of a vector with the mean value of that vector

i will try this code :

``````

df <- c(1,2,3,4,5,6,NA,7,8,9,NA)
df
mean_replace <- is.na(c)
df <- mean_replace(df)
df.mean()

``````

and this error

> df <- c(1,2,3,4,5,6,NA,7,8,9,NA)

> df
 [1]  1  2  3  4  5  6 NA  7  8  9 NA

> mean_replace <- is.na(c)

> df <- mean_replace(df)
could not find function "mean_replace"
May 29, 2021 in Data Analytics by Rizky

edited Mar 4, 2025 310 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP