I have a question about the interaction of jobs with RStudio Viewer pane --- where you usually see plotly plots. I'm have a plotly object that I create in a job and keep updating it, and would like to be able to visualize the result while the job runs. I can save the object in an rds file and open it from the console, but I would really like it to be automatic and not require me to revisit the file every once in a while, e.g. whenever it is updated.
In short, I would like a job to present plotly objects on the Viewer.
Also, two related question:
What can I use the Viewer pane for? can I view html files on? is there anything other than plotly that interacts with it?
RStudio allows me to create as many display devices equivalent to the plot pane, by using dev.new(). It comes with two devices, the built in one and the external one in case that you "pop out" the plot pane, but I can create as many as I want. Can I do the same with the Viewer pane? I.e., can I create multiple devices of the same type as that of Viewer to present different plotly objects? that would be very useful.
Have you considered whether this might be a good usecase for developing a simple shiny app?. One that creates the plotly object and renders the result as it changes?
Hi, thanks much for the suggestion. I must admit that I never developed a shiny app; I have no doubt I can learn it but I do not know anything how difficult/long is the learning curve. (I've been working with ggplot2 since forever, and only became familiar with plotly via ggplotly a few months back; it has been a game changer, and my work right now really benefits from it.)
Since I'm clueless at the moment about Shiny apps --- are they going to create a separate window, even with an R script running from RStudio as a job --- and refresh as the object presented is modified? or at least allow me to call a refresh function from the script to do so?
Also, I know that there are plenty of resources to learn how to write Shiny apps, but if you have any suggestion for a good/favorite one I'll highly appreciate it.