rstudio: RStudio environments

using_rstudioR Documentation

RStudio environments

Description

These functions enable you to determine whether code is being run in the presence of various features of the RStudio IDE and other Posit products.

using_rstudio() determines whether code is being run in RStudio. using_rstudio_desktop(), using_rstudio_server(), and using_rstudio_workbench() are helpers to determine whether those specific environments are being used.

using_rstudio_jobs() determines whether code is running as an RStudio Job

using_rstudio_dark_theme() determines whether a dark theme is being used

using_posit_connect() checks whether Posit Connect is being used

Usage

using_rstudio(mode = "any")

using_rstudio_desktop()

using_rstudio_server()

using_rstudio_workbench()

using_rstudio_jobs()

using_rstudio_dark_theme()

using_posit_connect()

Arguments

mode

Optional argument specifying whether RStudio is being used in "desktop" mode or in "server"/"workbench" mode.

Value

A logical value

See Also

https://docs.posit.co/connect/user/content-settings/#content-vars

Examples

using_rstudio()
using_rstudio_jobs()
using_rstudio_dark_theme()
using_posit_connect()

ami documentation built on April 4, 2025, 2:39 a.m.