Is the current R session running inside RStudio?

isRStudio()

Value

TRUE on success; FALSE on failure, with cause set.

Note

Updated 2020-04-12.

Examples

isRStudio()
#> [1] TRUE