title: How to properly use time-series objects in R?
body: <p>I have some daily data which looks like this:</p>
  
  <pre><code>&gt; head(daily_leads)
          date gross.leads day_of_week month
  1 2007-01-01        6427           2     1
  2 2007-01-02        7111           3     1
  3 2007-01-03        7367           4     1
  4 2007-01-04        7431           5     1
  5 2007-01-05        7257           6     1
  6 2007-01-06        7231           7     1
  </code></pre>
  
  <p>There are some clear intra-week trends and the same day of the week usually corresponds to similar levels (Friday's are similar counts to Fridays). There are also some trends going on here. Also there are trends over the course of the year.</p>
  
  <p>What is the correct way to set up a time-series object in R in order to make forecasts in my case? When I try this:</p>
  
  <pre><code>&gt; leads &lt;- ts(daily_leads$gross.leads, frequency = 1/7)
  &gt; q &lt;- decompose(leads)
  Error in decompose(leads) : time series has no or less than 2 periods
  </code></pre>
  
  <p>I'm not sure if I am setting it up correctly but I want the time-series object to reflect the seasonality within the week and year. Any help would be much appreciated. I have 2543 observations of the data.</p>