title: Make new column which adds 30 days to date on every row R
body: <p>I have a df with two variables, names and dates. I would like to create a new column (new_dates) which takes the first date belonging to each person (each person should have just one repeated date in this column) and add 30 days to each date as the rows descend. </p>
  
  <p>Desired output is below.  So row1 for each person holds the original date, row2 holds row1+30, row3 holds row2+30 and so on.</p>
  
  <pre><code>dff
     names      dates  new_dates
  1   john 2010-06-01 2010-06-01
  2   john 2010-06-01 2010-07-01
  3   john 2010-06-01 2010-07-31
  4   john 2010-06-01 2010-08-30
  5   mary 2010-07-09 2010-07-09
  6   mary 2010-07-09 2010-08-08
  7   mary 2010-07-09 2010-09-07
  8   mary 2010-07-09 2010-10-07
  9    tom 2010-06-01 2010-06-01
  10   tom 2010-06-01 2010-07-01
  11   tom 2010-06-01 2010-07-31
  12   tom 2010-06-01 2010-08-30
  </code></pre>
  
  <p>I thought I could use transform for this. Here is my attempt at it - but it doesn't quite work for me.</p>
  
  <pre><code>dt &lt;- transform(df, new_date = c(dates[2]+30, NA))
  </code></pre>