I have a custom function, and it works well.
Gplot = function(mydata, AE){
ggplot(mydata)+
...
geom_vline(aes(xintercept = breaks[2]), color = "seagreen", linetype = "dashed"))
}
...
Sometimes I don’t need the vertical line, so how to remove geom_vline when using it?
I know I can remove this sentence in the function, but I need it most of times. So I just want to remove it with some specific variables.