Learn R Programming

jjb (version 0.1.1)

external_graphs: Change Default Graphing Device from RStudio

Description

Checks to see if the user is in RStudio. If so, then it changes the device to a popup window.

Usage

external_graphs(ext = TRUE)

Arguments

ext

A logical indicating whether the graph should be done externally or internally in RStudio.

Value

There is no return value. Instead, once finished, the function will cause a side effect to occur. See details for more.

Details

Depending on the operating system, the default drivers attempted to be used are:

  • OS X: quartz()

  • Linux: x11()

  • Windows: windows()

Note, this setting is not permanent. Thus, the behavioral change will last until the end of the session.

Also, the active graphing environment will be killed. As a result, any graphs that are open will be deleted. You will have to regraph them.

Examples

Run this code
# NOT RUN {
# Turn on external graphs
external_graphs()

# Turn off external graphs
external_graphs(FALSE)
# }

Run the code above in your browser using DataLab