knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
This {rui} R package provides a wrapper around different {cli} and {usethis} functions, aiming at providing a small but consistent set of verbs to construct a simple R package UI.
The idea is that all of the verbs allow the use of {glue} strings and {cli} styles, to streamline coding with {rui}.
As of version v0.2.0, the rui::console()
function provides an alternative API
to the verbs, which may be easier for frequent {rui} users, although the verbs
better communicate developer intent.
You can install the latest version of {rui} with the following:
if (!require(pak)) install.packages("pak") pak::pak("rogiersbart/rui")
The {rui} verb API is used as follows:
rui::tell("Standard text") rui::entitle("Title a section") rui::inform("Provide information") rui::approve("Something seems to be fine") rui::disapprove("Something seems to be wrong")
The rui::console()
API allows the same to be achieved like this:
rui::console("Standard text") rui::console("# Title a section") rui::console("i Provide information") rui::console("v Something seems to be fine") rui::console("x Something seems to be wrong")
In a console/terminal, colours of the prefixes further help to distinguish the
different kinds of messages. The above is just a subset of the functionality,
however, as we have 19 verbs implemented at the moment. For a more thorough
introduction, see vignette("rui")
.
The package logo is a derivative of Bart Rogiers' CC BY 4.0-licensed espresso project.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.