title: Plotting multiple time series in 1 graph using GGPLOT2 and grouping dates by week OR month
body: <p>I like R but simple plotting is driving me mad. I have a 5 columns of data. The 1st column of data has dates in "numeric" the format 20101101, 20101102, etc...I tried converting from numeric to date but it didn't work.<br><br></p>
  
  <p>I'd like to make a line graph with col1, col2, col3 and col4 and with the dates on the x axis by week or month. I don't want to see all the dates just every week or every month. Can you help?<br><br></p>
  
  <p>Here is my R code:<br><br></p>
  
  <pre><code>dates&lt;-c(20101101,20101102,20101103,20101104,20101105,20101106,20101107,20101108,20101109,20101110,20101111,20101112,20101113,20101114,20101115,20101116,20101117,20101118,20101119,20101120)  &lt;br/&gt;
  col1&lt;-c(seq(from=1,to=20, by=1))&lt;br/&gt;
  col2&lt;-c(seq(from=11,to=30, by=1))&lt;br/&gt;
  col3&lt;-c(seq(from=21,to=40, by=1))&lt;br/&gt;
  col4&lt;-c(seq(from=31,to=50, by=1))&lt;br/&gt;
  data&lt;-cbind(dates, col1, col2, col3, col4)&lt;br/&gt;
  class(dates)&lt;br/&gt;
  data  #This is what my data looks like. NOTE: the "dates" field is type numeric so I TRY convert it below&lt;br/&gt;&lt;br/&gt;
  
  data[,1]&lt;-as.Date(as.character(data[,1]), format("%Y%m%d"))#convert to date class&lt;br/&gt;
  class(data[,1])  ### the conversion did not work. Help? The date column is still is numeric&lt;br/&gt;
  </code></pre>
  
  Now I'd like to show a line graph with 4 lines and with the dates on the x-axis by week or month  using ggplot<br/>
  
  <p><br/></p>
  
  <p>any help??<br/>
  <br/></p>
  
  #####<br/>
  
  <p><br/>
  Thank you.</p>