title: Replace NA with previous and next rows mean in R
body: <p>How could I Replace a NA with mean of its previous and next rows in a fast manner?</p>
  
  <pre><code>  name grade
  1    A    56
  2    B    NA
  3    C    70
  4    D    96
  </code></pre>
  
  <p>such that B's grade would be 63.</p>