note | R Documentation |
note
internally stores a colored message, while display
utilizes base::cat()
to present them
and reset the internal message stack.
note(msg, col = crayon::green)
display()
msg |
character: message |
col |
function: a color function (default: |
note
returns invisibly the number of notes
notetest <- function(msg) {
on.exit({ display() })
note(msg)
# do some complex computation
x <- 1+1
}
notetest("Hello world!")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.