Restore Viewer settings in RStudio-1.2.1335

Hello,
In order to view a 3D scatterplot which I created using plotly package, I tried to use options(viewer=NULL) function.

This worked as now I can directly view the 3D plot in the chrome browser upon executing the code. But now all my plotly plots (2D and 3D) are being shown on the browser upon execution.

Is there any way I can get the Viewer to be enabled again.

I tried using the below code but it did not work:

library(settings)
reset(options)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

options() returns the previously set options, so you could do:

# disable viewer
op <- options(viewer = NULL)
plotly::plot_ly()
# restore viewer
options(viewer = op$viewer)
plotly::plot_ly()