title: How to make a date column by year in R?
body: <p>I'm having trouble doing this and I need to because my ggplot x axis is messy. why doesnt the following work:</p>
  
  <pre><code>as.Date(c(2000:2012), "%Y")
  </code></pre>
  
  <p>Or is there a easier way to get the x axis to be years, maybe every 4? Adding</p>
  
  <pre><code>scale_x_datetime(labels = date_format("%Y"))
  </code></pre>
  
  <p>After my ggplot code returns</p>
  
  <pre><code>Error: Invalid input: time_trans works with objects of class POSIXct only
  </code></pre>