I would like to start by saying I have read this post and Brian Diggs gave some great help! https://stackoverflow.com/a/9085518/13364594 I am still having trouble getting my geom_segment to stop at a value derived from my data set.
ggplot(Slate_ts,aes (Date, Q))+
geom_line()+
geom_segment(data= Slate_ts, xend=as.POSIXct("2019-03-21"),x=as.POSIXct("2019-03-21"),y= -Inf, yend= Q)
Error in layer(data = data, mapping = mapping, stat = stat, geom = GeomSegment, : object 'Q' not found
If I swap the lower most Q for a value of 2 I get a graph:
I know I missing something fundamental in the script. Slate_ts data looks like this
- Date Q
- 2018-10-4 .0018
- 2018-10-5 .0027
Thank you r community in advance