info: Display message.

View source: R/info.R

infoR Documentation

Display message.

Description

Print a nicely formatted message, optionally with system time.

Usage

info(msg = "", type = "info", add_time = TRUE)

Arguments

msg

The message to display. Use for glue type interpolating. It can also detect the x in map using the get() function, but putting it into a function would cause an error, and simple bold text will be retrived.

type

Character. One of "info" (default)/"ok"/"warning". This will determine the color and the symbol.

add_time

Logical. Should the time printed? (default TRUE)

Examples

x = 3
info("The value of x is {x}.", "info", add_time = TRUE)

purrr::walk(1:10, \(x) info("{x} is bold!", "ok"))

purrr::walk(1:10, \(x) info("{x + 1} is bold!", "warning"))

MarcellGranat/granatlib documentation built on July 9, 2023, 6:08 a.m.