i am trying to use plotly to add various traces, but this is not wokring
library(plotly)
mat <- array(rnorm(1000), dim=c(10, 10, 10))
my_x <- c(1:10)
timetaken <- rep(1,10)
p<-plot_ly(y=timetaken, x=my_x , type=“scatter”, mode=“markers+lines”)
for(i in 5:6){
for(j in 4:7){
timetaken <- mat[i,my_x,j]
p<-add_trace(p, y=~timetaken, x=~c(1:10),type=“scatter”,mode=“markers+lines”)
}
}
p