title: Coerce xts to ts in R
body: <p>I have <code>xts</code> time-series object for 10 days of data. The data is sampled at minutes frequency. Therefore, for each day, I have 1440 observations. I need to coerce <code>xts</code> to <code>ts</code> object so that I can use <code>stl</code> function as used in the <a href="https://www.otexts.org/fpp/6/1" rel="nofollow noreferrer">example</a>. But, On coercion, R generates error as</p>
  <pre><code>ts(min_data,start=start(min_data),end = end(min_data),frequency=10)
  Error in ts(min_data, start = start(min_data), end = end(min_data), frequency = 10) : 
    invalid time series parameters specified
  </code></pre>
  <p>I set frequency to 10, since I am using data of 10 days. I am not sure whether it should be 10 or 1440. Can anyone help me to fix this error.</p>
  <p>MWE is as</p>
  <pre><code>library(xts)
  timevalues=&quot;20150101 0000/20150110 2359&quot;
  timesequence&lt;- timeBasedSeq(timevalues)
  min_data&lt;-xts(rnorm(14400),timesequence)
  ts_data&lt;- ts(min_data,start=start(min_data), end = end(min_data),frequency=10)
  </code></pre>
  <p><strong>UPDATE</strong>
  Although I am able to plot the graph using <code>stl</code> function as suggested by @Pascal, but still I am missing the time component in the x-axis of the graph. Any help will be greatly appreciated.</p>