title: R - Putting time series with frequency of 20 min into the function stl()
body: <p>I am trying to use the function stl() in R to smooth a data set that stores time vs. temperature from a sensor. The main goal is to remove noise from the function, in order to find the ambient temperature (baseline curve). I have loaded my data in time series format, and when I tried to use stl(), it gave me this error:</p>
  
  <pre><code>Error in stl(timeseries[[1]]) : 
    series is not periodic or has less than two periods
  </code></pre>
  
  <p>here is my data:</p>
  
  <pre><code>&gt; head(stations[[1]])
                   Date Unit Temp
  1 0013-06-30 10:00:01    C 32.5
  2 0013-06-30 10:20:01    C 32.5
  3 0013-06-30 10:40:01    C 33.5
  4 0013-06-30 11:00:01    C 34.5
  5 0013-06-30 11:20:01    C 37.0
  6 0013-06-30 11:40:01    C 35.5
  </code></pre>
  
  <p>which i have converted to time series class:</p>
  
  <pre><code>timeseries[[1]] = as.ts(stations[[1]]$Temp,freq=26280)
  </code></pre>
  
  <p>note : frequency is high as data is taken every 20 minutes </p>
  
  <p>Is the error with stl() due to a disagreement of the frequency? I have a feeling that I may have done something wrong when making my data a time series and that this has thrown off the ability to calculate the period of the series</p>
  
  <p>I do need all this data, as the entire set only covers 4 days worth of data (hence the high frequency)</p>
  
  <p>Thank you for your help!</p>