callFun: Call an RStudio API function

Description Usage Arguments Examples

Description

This function will return an error if RStudio is not running, or the function is not available. If you want to fall back to different behavior, use hasFun.

Usage

1
callFun(fname, ...)

Arguments

fname

name of the RStudio function to call.

...

Other arguments passed on to the function

Examples

1
2
3
if (rstudioapi::isAvailable()) {
  rstudioapi::callFun("versionInfo")
}

rstudio/rstudioapi documentation built on June 7, 2019, 3:43 p.m.