I have an histogram like the one below and I want to plot a vertical line of a specific value on top of the histogram.
My code for the histogram is:
library(plotly)
p <- plot_ly(x = ~rnorm(50,mean = 50,sd = 10), type = "histogram")
p
I want to overlay a line on top of the histogram, for example say,
x <- 42
Can anyone help getting this?