isJob: Detect RStudio Jobs

View source: R/remote.R

isJobR Documentation

Detect RStudio Jobs

Description

Use this function to detect whether RStudio is running an R "job". These jobs are normally used for actions taken in the Jobs tab, as well as within the R build pane.

Usage

isJob()

isBackgroundJob()

isWorkbenchJob()

Details

isWorkbenchJob() is used to detect scripts which have been launched as Workbench jobs, and is only available in RStudio Workbench 2024.04 or newer. These jobs use the RStudio Launcher to run R scripts on remote clusters, as opposed to isBackgroundJob(), which is used to detect background jobs which are run on the local machine.

This function is primarily intended to be used by package authors, who need to customize the behavior of their methods when run within an RStudio job.

Value

Boolean; TRUE if this is an RStudio job.


rstudio/rstudioapi documentation built on March 29, 2024, 2:34 p.m.