knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/", out.width = "100%" )
The R package messages
is a collection of functions to print messages in the
R console using the packages cli
and
crayon
. This package is strongly
inspired from the functions ui_*()
of the package
usethis
.
You can install the development version from GitHub with:
# install.packages("remotes") remotes::install_github("frbcesab/messages")
## Attach package ---- library("messages")
## Success message ---- msg_done("A success message") ## Todo message ---- msg_todo("A to do message") ## Info message ---- msg_info("An informational message") ## Warning message ---- msg_warn("A warning message") ## Error message ---- msg_oops("An error message") ## Message ---- msg_line("A classic message") ## Message within a rule ---- msg_rule("Left message") ## Message within a rule ---- msg_rule(center = "Center message") ## Message within a rule ---- msg_rule(right = "Right message") ## Messages with inline customization ---- x <- 1 msg_done("The variable", msg_field("x"), "has been set to", msg_value(x)) ## Messages with inline customization (2) ---- msg_todo("Please use the function:", msg_code("msg_rule()")) ## Messages with inline customization (3) ---- msg_todo("Please use the function:\n", msg_code("msg_rule()"))
Please cite this package as:
Casajus N. (2022) messages: Print messages in the console. R package version 1.0. URL: https://frbcesab.github.io/messages/.
You can also run:
citation("messages") ## A BibTeX entry for LaTeX users is: ## ## @Manual{, ## title = {{messages}: {P}rint messages in the console, ## author = {{Casajus N.}}, ## year = {2022}, ## note = {R package version 1.0}, ## url = {https://frbcesab.github.io/messages/}, ## }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.