Hello all - First time post. Hope to find some help on some issues I've been having after updating to Rstudio 2024.04.1 build 748 earlier this week.
My plotly code was written in a previous version of Rstudio, and used to run perfectly, and the plot would be displayed in the Viewer pane. But now that I updated R, Rstudio and the plotly package, the code runs without returning an error, but the Viewer pane is blank and empty. I can find the plot with Export > Save as a Web page, save it, and it opens fine a browser window, but (obviously) it would feel easier to have it displayed directly in the Viewer pane like I used to. The plot is also generated correctly and embedded when I compile the report. So to my understanding, it should mean that the code in itself is OK.
Inspect element > console returns a handful of errors: "Failed to load resource: the server responded with a status of 404 (not found)" and "Failed to load resource: net: : ERR_SOCKET_NOT_CONNECTED"... So I am guessing the Viewer pane or my R session is not set up correctly somehow when I updated? I uninstalled and re-install R and Rstudio a couple of times now, but no luck unfortunately.
After looking around online, I also "played around" with Global options > R Markdown > Show Output Preview, and specified "Viewer Pane". I also unchecked "show output inline for all Markdown documents". But the Viewer Pane is still blank and empty
I hope it is an easy fix. I apologize in advance if this is a stupid question, and if I made a mistake somewhere along the install process. Any help would be greatly appreciated! Many thanks in advance. Steph
For reference, I am using
R version 4.4.0 (2024-04-24 ucrt)
Rstudio 2024.04.1 build 748
plotly 4.10.4
My understanding is that they all are the latest versions.
here is a simple example of a typical chunk of code I am running:
library(plotly)
df <- read.csv("https://raw.githubusercontent.com/plotly/datasets/master/violin_data.csv")
fig <- df %>% plot_ly(
y = ~total_bill,
type = 'violin',
box = list(visible = T),
meanline = list(visible = T ),
x0 = 'Total Bill' )
fig <- fig %>% layout(yaxis = list(title = "", zeroline = F))
fig