What is "RStudioGD?"

What is "RStudioGD"?
It appears after this code:

pdf(file="SilSys sociogram.pdf", width=7.5,height=9)


If I type:

RStudioGD #I get this:

function ()
<environment: 0x000000000ea30ec8>

I've searched all over and have not been able to find an answer. Could someone explain this to a very befuddled newbe? Thanks a lot. And sorry for probably breaking every posting convention in the book!

I cannot give you a full answer, but may be able to shed some light on this, and provide some related feature I recently found: RStudioGD is the name of the graphical device/driver used by RStudio to show charts. See dev.list(). What you see in the plots window is generated using this driver. (The View window though keeps "snapshots" in some form of charts generated, but I think that this is besides the point and is unrelated to any capability of the actual driver.)
The nice feature that I found is that you can create additional RStudioGD devices --- that will open in a new window, and choose them as the current device. That will plot any chart that you generate on the window associate with the device you created. Here is a code example of setting this up:

> dev.list()
#        RStudioGD quartz_off_screen 
#              2                 3 
> dev.new(RStudioGD())
> dev.list()
#        RStudioGD quartz_off_screen            quartz            quartz 
#               2                 3                 4                 5 
#     5 
> dev.cur()
#     5 
> ggplot(data.frame(x=1:10,y=1:10),aes(x=x,y=y)) + geom_line()
> dev.cur()
#     5 
> dev.set(2)
#        2 
> ggplot(data.frame(x=1:10,y=1:10),aes(x=x,y=y^2)) + geom_line()

The dev.new(RStudioGD()) will crate a new empty external window. At the moment the current device, as you can see after the call to dev.cur(); but I then set the current device to be the new external window that uses the RStudioGD driver, and plot the y=x chart; it will appear on the external window; I then set the current device back to 2, and plot the y=x^2, and it will appear in the View window.

I personally found it useful as I often want to see multiple charts near each other in separate windows, all initialed from the same R session.

That doesn't address your problem, I guess, but hopefully shed some light and share a related feature that I find very useful.

Edit: BTW, you can see some info about it under tools:rstudio:RStudioGD:

? tools:rstudio:RStudioGD 

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.