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"