colored_output: Print out some Information

Description Usage Arguments Value Examples

Description

Used to print out some information during the execution of a function. This function prints out the text in green (#00FF00) using the crayon package.

Used to print out a simple list, with color, and aligned values.

Usage

1
2
3
info(..., useMsg = TRUE, printOut = TRUE, sep = "")

color_list(vec, cols = c("#FF00FF", "#FF8800", "#00FF00"), printOut = TRUE)

Arguments

...

Text to print out (can also be named arguments to message/cat, e.g. sep, which defaults to " ").

useMsg

Whether to use message to print the text (uses cat otherwise).

printOut

Whether to print the value out (might just want the colored string raw).

sep

Separator to use in the cat function (only used when !useMsg) (character scalar).

vec

Vector to print (preferably a list).

cols

Colors to use (vector of three strings that crayon::make_style accepts).

Value

The colored string, invisibly.

The colored output lines, invisibly.

Examples

1
2
3
4
5
info("hello world")

color_list(list(apple = "banana", cherry = "orange", peach = "pineapple"))
color_list(list(apple = "banana", cherry = "orange", peach = "pineapple",
           plum = list(plum = "plum")))

KO112/KO documentation built on Oct. 2, 2020, 9:21 a.m.