I'm new in R. My question is how to impute missing value using mean of before and after of the missing data point?
example;
using the mean from the upper and lower of each NA as the impute value.
-mean for row number 3 is 38.5
-mean for row number 7 is 32.5
age
52.0
27.0
NA
23.0
39.0
32.0
NA
33.0
43.0
Thank you.