title: Plotting Time Series graphs in R
body: <p>I need to plot a time series in R. But having a tough time to figure out how to work with the formats.</p>
  
  <pre><code>dates &lt;- c(20060901, 20060905, 20060906, 20060907, 20060908, 20060911)
  values &lt;- c(33.6, 32.0, 30.0, 30.0, 30.0, 28.4)
  </code></pre>
  
  <p>Need to convert the dates in proper Format E.g: 20060901 to Sep-01-2006 and so on</p>
  
  <p><strong>My approach so far:</strong></p>
  
  <pre><code>dates = as.Date(dates, "%Y%m%d")
  plot(dates , values)
  </code></pre>
  
  <p>However, I get the following error : </p>
  
  <pre><code>Error in charToDate(x) : character string is not in a standard unambiguous format
  </code></pre>