title: Time series data for weather analysis in R
body: <p><a href="https://i.stack.imgur.com/Fzvbo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Fzvbo.png" alt="enter image description here" /></a>I have data from 1949 to 2013 (month to month). I am trying to convert it into time series data. But I  get only the data of 1975. The rest of the years are not shown</p>
  <pre><code> wt_1 &lt;- xts(wt[,c(&quot;Max.Temp&quot;,&quot;Min.Temp&quot;,&quot;Rainfall&quot;)], order.by=as.Date(wt$YEAR))
  </code></pre>
  <p>When I am using Month instead of YEAR</p>
  <pre><code> wt_1 &lt;- xts(wt[,c(&quot;Max.Temp&quot;,&quot;Min.Temp&quot;,&quot;Rainfall&quot;)], order.by=as.Date(wt$Month))
  </code></pre>
  <p>only the data of 1970 is shown. Other Years data are not shown.</p>
  <p>What can I do?</p>