powered by
Capture the output of cli functions instead of printing it
cli_fmt(expr, collapse = FALSE, strip_newline = FALSE)
Expression to evaluate, containing cli_*() calls, typically.
cli_*()
Whether to collapse the output into a single character scalar, or return a character vector with one element for each line.
Whether to strip the trailing newline.
cli_fmt({ cli_alert_info("Loading data file") cli_alert_success("Loaded data file") })
Run the code above in your browser using DataLab