R_switch | R Documentation |
Switch R framework version on Mac
R_switch(
version = R_frameworks(),
reset = TRUE,
openRStudio = TRUE,
frameworkPath = "/Library/Frameworks/R.framework/",
RStudioPath = "/Applications/RStudio.app/Contents/MacOS/RStudio"
)
reset |
if TRUE, the framework is changed back to the original framework version. |
openRStudio |
if TRUE, open an RStudio session with the new R framework version. |
frameworkPath |
the R.framework path, the default is "/Library/Frameworks/R.framework/" on Mac. |
RStudioPath |
RStudio path, the default is "/Applications/RStudio.app/Contents/MacOS/RStudio". |
Version |
R framework version to switch to |
## Not run:
# List all frameworks
fw = R_frameworks()
fw
# Current framework
cfw = R_currentFramework()
cfw
# Switch
R_switch(setdiff(fw, cfw)[1], reset = FALSE, openRStudio = TRUE)
R_switch(cfw, reset = FALSE, openRStudio = TRUE)
R_switch(setdiff(fw, cfw)[1], reset = TRUE, openRStudio = FALSE)
# Reset the initial framework
R_switch(cfw, reset = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.