I'm a new stackoverflow user and can't comment currently on the original post to ask a question. I came across a previous stackoverflow answer (https://stackoverflow.com/a/34045068/11799491) and I was wondering how you would add two vertical lines (mean of the group and median of the group) to this graph here.
My attempt: I don't know how to add in the group variable "type"
geom_vline(aes(xintercept = mean(diff), ), color="black") +
geom_vline(aes(xintercept = median(diff), ), color="red")