Black Lives Matter. Please consider donating to Black Girls Code today.

Error in match.arg(on, paste0("plotly_", c("click", "hover", "selected")))

I have RStudio 1.3.1093. My R version (if independent) is 4.0.3. I’m on macOS Mojave 10.14.6.

I’m working through and I get to the first use (that I can see) of plotly.

m <- highlight_key(mpg)
p <- ggplot(m, aes(displ, hwy)) + geom_point()
gg <- highlight(ggplotly(p), "plotly_selected")

I get the error
Error in match.arg(on, paste0(“plotly_”, c(“click”, “hover”, “selected”)))

Is there some python dependence I need to install separately from the R install packages?

Is there some other problem?

The argument as given certainly should match.

I’ve just tried this in R using the CLI, and it works. Seems to be a problem only in RStudio.