title: Convert date to month/year format for time series
body: <p>I have some have some water quality sample data. </p>
  
  <pre><code>&gt; dput(GrowingArealog90s[1:10,])
  structure(list(SampleDate = structure(c(6948, 6949, 6950, 7516, 
  7517, 7782, 7783, 7784, 8092, 8106), class = "Date"), Flog90 =  c(1.51851393987789, 
  1.48970743802793, 1.81243963000062, 0.273575501327576, 0.874218895695207, 
  1.89762709129044, 1.44012088794774, 0.301029995663981, 1.23603370361931, 
  0.301029995663981)), .Names = c("SampleDate", "Flog90"), class = c("tbl_df", 
  "data.frame"), row.names = c(NA, -10L))
  </code></pre>
  
  <p>This data is collected monthly, although some months are missed over the 25 year period.</p>
  
  <p>I know there is so much help out there for converting dates to different formats but I have not been able to figure this out.  I want to create a time series with just a month/year format, so that I can do things like decompose the data by month and run seasonal kendalls and such.  I have tried so many different ways of converting my date to the desired format that I have completely confused myself.  I don't care about the exact format as long as it is recognized month/year.</p>
  
  <p>I also need to fill in the missing months with NAs.  </p>
  
  <p>I tried uploading the "SampleDate" column in a numeric format, "yyyymm". I could then merge that data frame with another that contained all the dates I need.  </p>
  
  <pre><code>GA90 &lt;- merge(Dates, GrowingArealog90s, by.x = "Date", by.y = "Date", all.x = TRUE)
  </code></pre>
  
  <p>However, when I converted the resulting data frame to a time series it would not recognize the 12 month frequency.</p>
  
  <pre><code> GA90ts &lt;- as.ts(GA90, frequency(12))
  
  &gt; GA90ts
  Time Series:
  Start = 1 
  End = 324 
  Frequency = 1 
  </code></pre>
  
  <p>Any help with this is appreciated.</p>