Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

hasColorConsole

Check if console supports ANSI color escapes.


Description

Check if the RStudio console supports ANSI color escapes.

Usage

hasColorConsole()

Value

TRUE if ANSI color escapes are supported; FALSE otherwise.

Note

The hasColorConsole function was added in version 1.1.216 of RStudio.

Examples

## Not run: 
if (rstudioapi::hasColorConsole()) {
  message("RStudio console supports ANSI color sequences.")
}


## End(Not run)

rstudioapi

Safely Access the RStudio API

v0.13
MIT + file LICENSE
Authors
Kevin Ushey [aut, cre], JJ Allaire [aut], Hadley Wickham [aut], Gary Ritchie [aut], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.