note: Create and display a note

View source: R/note.R

noteR Documentation

Create and display a note

Description

note internally stores a colored message, while display utilizes base::cat() to present them and reset the internal message stack.

Usage

note(msg, col = crayon::green)

display()

Arguments

msg

character: message

col

function: a color function (default: crayon::green)

Value

note returns invisibly the number of notes

Examples

notetest <- function(msg) {
  on.exit({ display() })
  note(msg)
  # do some complex computation
  x <- 1+1
}
notetest("Hello world!")

sigbertklinke/mmstat4 documentation built on Sept. 13, 2024, 4:46 p.m.