title: Convert weekly data to time series 'ts' object
body: <p>I have the <code>weekly</code> data:</p>
  
  <pre><code>weekly &lt;- structure(list(date = c("2013-01-07", "2013-01-10", "2013-01-21", 
  "2018-01-23", "2018-02-00", "2013-02-11", "2013-02-13", "2013-02-25", 
  "2013-03-00", "2013-03-11", "2013-03-13", "2013-03-25", "2018-00-01", 
  "2018-00-08", "2018-00-15", "2018-00-22", "2018-00-29", "2018-05-06", 
  "2018-05-13"), count = c(1750L, 1993L, 1816L, 1264L, 2042L, 1989L, 
  2186L, 2118L, 2081L, 2110L, 2151L, 2069L, 1898L, 1862L, 1952L, 
  1891L, 1758L, 1169L, 2009L)), row.names = c(NA, -19L), class = "data.frame")
  </code></pre>
  
  <p>I want to convert this data to the time series <code>ts</code> object so that I can forecast the data. </p>
  
  <p>I saw <a href="https://stackoverflow.com/questions/22188660/r-time-series-modeling-on-weekly-data-using-ts-object">this question</a> but it didn't help me.</p>
  
  <p>The code below creates <code>data.frame</code> with date and count </p>
  
  <pre><code>agr &lt;-aggregate(input[1], input[2], FUN =  function(df) count=length(df))
  colnames(agr)[2] &lt;- "count"
  </code></pre>
  
  <p>The below the <code>weekly</code> data created:</p>
  
  <pre><code>weekly &lt;- agr %&gt;%
    tq_transmute(select     = count,
                 mutate_fun = apply.weekly,
                 FUN        = sum)
  </code></pre>
  
  <p>Now I want to convert this weekly data to time series data so that I can apply ARIMA model.</p>