cli_qty_lgl | R Documentation |
Equivalents to cli::qty()
and cli::no()
for a logical input.
cli_qty_lgl(cnd)
cli_no_lgl(cnd)
cnd |
Condition. A logical scalar. |
If cnd
evaluates to TRUE
, the resulting cli quantity is 1
, otherwise 0
. See cli's pluralization rules for details about how these quantities are interpreted.
0L
or 1L
with the additional class cli_noprint
.
Other functions extending the cli package:
cli_process_expr()
,
cli_progress_step_quick()
cnd <- runif(1L) < 0.5
cli::pluralize(paste0(
"{pal::cli_qty_lgl(cnd)}I think this function ",
"{?comes in handy/is not worth a second of my attention}. Having looked at the rest of the ",
"package, this {?is quite surprising/does not come as a surprise}."
))
cli::pluralize("This function is worth exactly {pal::cli_no_lgl(cnd)} second of my time.")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.