Learn R Programming

cnd (version 0.1.0)

format-conditions: Format conditions

Description

Formats condition objects

Usage

# S3 method for `cnd::condition`
format(x, ..., cli = getOption("cnd.cli.override"))

# S3 method for `cnd::condition_generator` format(x, ..., cli = getOption("cnd.cli.override"))

Value

A character vector

Arguments

x

A condition object

...

Not used

cli

If TRUE will use formatting from cli. Default uses an option, "cnd.cli.override", if available, otherwise checks that cli is installed and ansi colors are available.

Examples

Run this code
format(condition("foo"))

Run the code above in your browser using DataLab