title: Convert data into time series data using R
body: <p>I have one csv file with two columns - one of monthly date &amp; another sale in dollar. The table is:</p>
  
  <p>The table head:</p>
  
  <pre><code>month   US dollar
  31-12-1978  207.8
  31-01-1979  227.3
  28-02-1979  245.7
  30-03-1979  242.1
  30-04-1979  239.2
  31-05-1979  257.6
  </code></pre>
  
  <p>The table bottom:</p>
  
  <pre><code>31-12-2013  1,225.40
  31-01-2014  1,244.80
  28-02-2014  1,301.00
  31-03-2014  1,336.10
  30-04-2014  1,299.00
  30-05-2014  1,287.50
  </code></pre>
  
  <p>I am able to import the data correctly. But I am unable to convert it to time series data. The code I used:</p>
  
  <pre><code>data &lt;- ts(data[,2],start = c(1978,12,31), end = c(2014,5,30), frequency = 12)
  </code></pre>
  
  <p>Thanks in advance.</p>