I have a table with column called 'rates'. This column include missing values. I need to calculate linear function where missing values are calculated based on previous existing value and a value that follows the missing value, and there should be an equal interval between replaced missing values.
For example, column 'rates' include values: 0,66 Na Na Na 0,77 0,75 0,79 Na Na 0,79
And I need to get a new column where Na values will be replaced in R the way I described above.