title: In R: How to create a column such that there is an initial value, and each next value is previous plus a set integer
body: <p>I apologize if this is a repetitive question to others listed... I have looked and looked and tried multiple ideas but can't seem to find a working answer.</p>
  
  <p>I have a column "Expected" within list TFAOS with multiple columns. </p>
  
  <p>edit: dataframe is: <br>
  patients &lt;- c(1:17)<br> 
  Expected &lt;- c(0) <br>
  TFAOS &lt;- data.frame(patients, Expected) <br></p>
  
  <p>Expected should be:</p>
  
  <p>Expected <br>
  17/24 <br>
  previous value + 17/24 <br>
  previous value + 17/24 <br>
  etc. for 17 rows</p>
  
  <p>OR THE EQUIVALENT:</p>
  
  <p>Expected <br>
  17/24 * 1 <br>
  17/24 * 2 <br>
  17/24 * 3 <br>
  etc. for 17 rows</p>
  
  <p>Can anyone help with a simple solution? </p>
  
  <p>I have tried:<br>
  TFAOS[1,2]=17/24 <br>
  TFAOS[2:17, 2] = TFAOS$Expected[-1] + 17/24</p>
  
  <p>AND </p>
  
  <p>mutate(TFAOS, Expected = 17/24 + lag(Expected, default =0))</p>
  
  <p>These both just give the same 17/24 value for each row. </p>
  
  <p><br> <br>
  Thank you so so much in advance.</p>