This following error occurs in when executing in RStudio, but not when executing the same code at the CLI.
Error in match.arg(on, paste0(“plotly_”, c(“click”, “hover”, “selected”)))
I'm following the plotly-r manual from https://plotly-r.com/preface.html and the first example using plotly is
library(plotly)
m <- highlight_key(mpg)
p <- ggplot(m, aes(displ, hwy)) + geom_point()
gg <- highlight(ggplotly(p), "plotly_selected")
crosstalk::bscols(gg, DT::datatable(m))
I get the error above.
I have RStudio 1.3.1093. My R version (if independent) is 4.0.3. I’m on macOS Mojave 10.14.6.
Is this a known problem for which there is a work-around, or must I just stick to the CLI for these examples?