title: R - approximate missing month values using zoo package
body: <p>Consider code:</p>
  
  <pre><code>library('zoo')
  
  data &lt;- c(1, 2, 4, 6)
  dates &lt;- c("2016-11-01", "2016-12-01", "2017-02-01", "2017-04-01");
  z1 &lt;- zoo(data, as.yearmon(dates))
  z2 &lt;- na.approx(z1)
  </code></pre>
  
  <p>Variable <code>z2</code> looks like this:</p>
  
  <pre><code>nov 2016 dec 2016 feb 2017 apr 2017 
         1        2        4        6 
  </code></pre>
  
  <p>But I need <code>z2</code> to be similar to this:</p>
  
  <pre><code>nov 2016 dec 2016 jan 2017 feb 2017 mar 2017 apr 2017 
         1        2        3        4        5        6
  </code></pre>
  
  <p>I just need to approximate values for months where value is missing. Thanks for any hints.</p>