title: Increment a variable by 5% every week in R
body: <p>I have the following data:</p>
  <pre><code>date &lt;- seq.Date(from = as.Date(&quot;2022-01-01&quot;), to = as.Date(&quot;2022-07-01&quot;), by = &quot;day&quot;)
  value &lt;- rep(500, length(date))
  mydf &lt;- cbind.data.frame(date, deliveries)
  </code></pre>
  <p>I want to increment my value variable by 5% EACH WEEK, i.e., mydf$value[1:7] remains unchanged, mydf$value[8:14] become 500*(1.05) = 525, mydf$value[15:21] become 525*(1.05) = 551.25, and so on.</p>