title: Coalesing with lags/leads over rows?
body: <p>Hey guys suppose I have a data frame</p>
  
  <pre><code>    Year   Month   1_month_sub   3_month_sub   12_month_sub
      2014     1         3             1              1
      2014     2         1             0              0
      2014     3         1             0              0
      2014     4         1             0              0
      2014     5         4             0              0
      2014     6         1             0              0
      2014     7         5             0              0
      2014     8         1             0              0
      2014     9         1             0              0
      2014     10        6             0              0
      2014     11        1             0              0
      2014     12        3             0              0
  </code></pre>
  
  <p>Where 1_month sub indicates that 1 month subscription was purchased, 3 month sub indicates that a 3 month subscription was purchased etc.
  I need to add a column that gives me a # of monthly subscribers at any given unit of time. Thus the results would look like:</p>
  
  <pre><code>    Year   Month   1_month_sub   3_month_sub   12_month_sub  subs
      2014     1         3             1              1         5
      2014     2         1             0              0         3
      2014     3         1             0              0         3
      2014     4         1             0              0         2
      2014     5         4             0              0         5
      2014     6         1             0              0         2
      2014     7         5             0              0         6
      2014     8         1             0              0         2
      2014     9         1             0              0         2
      2014     10        6             0              0         7
      2014     11        1             0              0         2
      2014     12        3             0              0         4
      2015      1        1             0              0         1
  </code></pre>
  
  <p>I have used the COALESCE, LAG, LEAD functions with no real success. Any ideas on how I can approach this?</p>