title: ggplot adding vertical line on Date axis
body: <p>I am trying to add a vertical line at a specific date on an axis of Dates. Based on <a href="https://stackoverflow.com/questions/5388832/how-to-get-a-vertical-geom-vline-to-an-x-axis-of-class-date">this SO post</a> it seems that I need to cast the Date as numeric, however that doesn't work for me. What am I doing wrong?</p>
  
  <p>My error:</p>
  
  <pre><code>Error: ggplot2 doesn't know how to deal with data of class uneval
  </code></pre>
  
  <p>My code</p>
  
  <pre><code>library(lubridate)
  trump_score&lt;-NULL
  trump_score$Date &lt;-parse_date_time(c("2017-01-01","2017-01-24","2017-01-25"), orders="ymd")
  
  trump_score$powerSentimentScore&lt;-c(10,25,10)
  denyTPP&lt;-parse_date_time("2017-01-23", orders="ymd ")
  
  require(ggplot2)
  ggplot( aes(trump_score$Date))+
    geom_line(aes(y=trump_score$powerSentimentScore),colour="green")+
    geom_vline(aes(xintercept = as.POSIXct(as.Date(denyTPP))), linetype="dotted", color = "blue", size=1.5)
  </code></pre>