I am using plotly in Rmarkdown. When I plot a graph, id there a way to download the underlying data ?
library(plotly)
x <- c(1:100)
random_y <- rnorm(100, mean = 0)
data <- data.frame(x, random_y)
p <- plot_ly(data, x = ~x, y = ~random_y, type = 'scatter', mode = 'lines')
Typically in the plot above I would like to get the data data.frame in some csv format