title: Change Week Numbers to number of weeks that have passed rather than week number of the year
body: <p>I am trying to create a column in a dataset that will indicate what week the data in a row was collected. I have come partway to a solution using the following code:</p>
  <pre><code>df$Week &lt;- as.integer(format(df$Date_time, &quot;%V&quot;))
  df&lt;- transform(df, Week = Week - min(Week) + 1)
  </code></pre>
  <p>This produces the column I want, however, it numbers the weeks by the week of the year, starting at 49, rather than just a cumulative number of weeks starting at 1. I'm attempting to just subtract the week by the minimum value in the &quot;week&quot; column and adding 1, but it doesn't seem to work.</p>
  <pre><code>
      Target_length_across_beams Target_range_extent Ping_number         Target_class Target_orientation ...45        Date_time      Week
                         -9.9e+37            -9.9e+37           0 Unclassified targets           -9.9e+37    NA 2020-12-01 18:14:54   49
                         -9.9e+37            -9.9e+37           0 Unclassified targets           -9.9e+37    NA 2020-12-01 18:14:54   49
                         -9.9e+37            -9.9e+37           0 Unclassified targets           -9.9e+37    NA 2020-12-01 18:14:54   49
                         -9.9e+37            -9.9e+37           1 Unclassified targets           -9.9e+37    NA 2020-12-01 18:14:55   49
                         -9.9e+37            -9.9e+37           1 Unclassified targets           -9.9e+37    NA 2020-12-01 18:14:55   49
                         -9.9e+37            -9.9e+37           1 Unclassified targets           -9.9e+37    NA 2020-12-01 18:14:55   49
  
  </code></pre>
  <p>What I want is for the &quot;49&quot; in the week column to be changed to &quot;1&quot; and for that value to increase by 1 for each consecutive week.</p>