title: Calculating growth factor for data set
body: <p>I am trying to do here is compare the daily growth factor across all the eight states in Australia from 17 March 2020 to 16 August 2020. (The growth factor is calculated by dividing the new cases on the current day with the new cases of the previous day.)</p>
  <p>This is the inner structure of the file.</p>
  <pre><code>str(covid)
  'data.frame':   1640 obs. of  13 variables:
   $ date         : Date, format: &quot;2020-01-25&quot; &quot;2020-01-25&quot; ...
   $ state        : chr  &quot;Australian Capital Territory&quot; &quot;New South Wales&quot; &quot;Northern Territory&quot; 
  &quot;Queensland&quot; ...
   $ state_abbrev : chr  &quot;ACT&quot; &quot;NSW&quot; &quot;NT&quot; &quot;QLD&quot; ...
   $ confirmed    : int  0 3 0 0 0 0 1 0 0 0 ...
   $ confirmed_cum: int  0 3 0 0 0 0 1 0 0 3 ...
   $ deaths       : int  0 0 0 0 0 0 0 0 0 0 ...
   $ deaths_cum   : int  0 0 0 0 0 0 0 0 0 0 ...
   $ tests        : int  0 0 0 0 0 0 0 0 0 0 ...
   $ tests_cum    : int  0 0 0 0 0 0 0 0 0 0 ...
   $ positives    : int  0 0 0 0 0 0 0 0 0 0 ...
   $ positives_cum: int  0 0 0 0 0 0 0 0 0 0 ...
   $ recovered    : int  0 0 0 0 0 0 0 0 0 0 ...
   $ recovered_cum: int  0 0 0 0 0 0 0 0 0 0 ...
  
  </code></pre>
  <p>can anyone please help?</p>