callFun: Call an RStudio API function

View source: R/code.R

callFunR Documentation

Call an RStudio API function

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

callFun(fname, ...)

Arguments

fname

name of the RStudio function to call.

...

Other arguments passed on to the function

Examples


if (rstudioapi::isAvailable()) {
  rstudioapi::callFun("versionInfo")
}


rstudio/rstudioapi documentation built on March 5, 2024, 4:21 a.m.