Learn R Programming

rstudioapi (version 0.17.0)

isJob: 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()

Arguments

Value

Boolean; TRUE if this is an RStudio job.

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.