Replaces NAs in a numeric vector with the mean of the non-NA values.
NA
i_mean(x)
x
A numeric vector
x <- c(1,2,3,4, NA) i_mean(x)