title: Issue with a drawing a vertical line in ggplot for categorical variable x-axis in R
body: <p>I have the following table. I want to plot a vertical line using the "st_date_wk" column for each county. Please see my code below but it DOES NOT draw the vertical line using the "st_date_wk" column. Cannot figure out what I am doing wrong here. </p>
  
  <p>Any help is appreciated. </p>
  
  <p>Thanks.</p>
  
  <pre><code>dfx1:
  
  YEAR     Week       Area    acc_sum    percentage COUNTY st_date_wk    
  1998     10-1       250     250        12.4       133    10-4
  1998     10-2       300     550        29.0       133    10-4   
  1998     10-3        50     600        58.0       133    10-4
  1998     10-4       100     700        75.9       133    10-4
  1998     10-5       100     800       100.0       133    10-4
  1999     9-3         75      75        22.0       205    10-2
  1999     10-1       250     250        12.4       205    10-2
  1999     10-2       300     550        29.0       205    10-2   
  1999     10-3        50     600        58.0       205    10-2
  1999     10-4       100     700        75.9       205    10-2
  1999     10-5       100     800       100.0       205    10-2
  .
  .
  
  dfx1$YEAR &lt;- as.factor(dfx1$YEAR)
  dfx1$COUNTY &lt;- as.factor(dfx1$COUNTY)
  dfx1$percentage &lt;- as.numeric(dfx1$percentage)
  dfx1$acc_sum &lt;- as.numeric(dfx1$acc_sum)
  dfx1$Week &lt;- factor(dfx1$Week, ordered = T)
  dfx1$st_date_wk &lt;- factor(dfx1$st_date_wk,ordered = T)
  
  dfx1$Week &lt;- factor(dfx1$Week, levels=c("6-1","6-2","6-3","6-4","6-5","7-1","7-2","7-3","7-4","7-5","8-1","8-2","8-3","8-4","8-5","9-1","9-2","9-3","9-4","9-5","10-1","10-2","10-3","10-4","10-5","11-1","11-2","11-3","11-4","11-5","12-1","12-2","12-3","12-4","12-5"))
  
  gg &lt;- ggplot(dfx1, aes(Week,percentage, col=YEAR, group = YEAR))
  gg &lt;- gg + geom_line()
  gg &lt;- gg + facet_wrap(~COUNTY, 2, scales = "fixed")
  gg &lt;- gg + theme(text = element_text(size=15), axis.text.x = element_text(angle=90, hjust=1))
  gg &lt;- gg + geom_vline(data=dfx1, aes(xintercept = dfx1$st_date_wk), color = "blue", linetype = "dashed", size = 1.0)+  facet_wrap(~COUNTY)
  
    plot(gg)
  
  1: In Ops.ordered(x, from[1]) : '-' is not meaningful for ordered factors
  </code></pre>