formatColoured: Print Coloured Messages

formatColouredR Documentation

Print Coloured Messages

Description

Print Coloured Messages

Usage

formatColoured(
  txt,
  colour = c("yellow", "blue", "grey"),
  bold = FALSE,
  cat = TRUE
)

Arguments

txt

Character. Text to print or transform.

colour

Character. Any of: grey, red, green, yellow, blue, or purple.

bold

Boolean. Set bold text?

cat

Boolean. Print with cat? If not, raw string

Value

Depends on cat: NULL if TRUE or character string if FALSE.

See Also

Other Tools: autoline(), bind_files(), bring_api(), chr2num(), db_download(), db_upload(), export_plot(), export_results(), files_functions(), font_exists(), formatHTML(), get_credentials(), glued(), grepm(), h2o_selectmodel(), haveInternet(), image_metadata(), importxlsx(), ip_data(), json2vector(), list_cats(), listfiles(), mail_send(), markdown2df(), move_files(), msplit(), myip(), quiet(), read.file(), statusbar(), tic(), try_require(), updateLares(), warnifnot(), what_size()

Examples

opts <- c("GREY", "RED", "GREEN", "YELLOW", "BLUE", "PURPLE")
for (colour in opts) formatColoured(paste("Colour:", colour, "\n"), colour)
formatColoured("my bold coloured text", bold = TRUE, cat = TRUE)

lares documentation built on Sept. 13, 2024, 1:08 a.m.