formatter | R Documentation |
R6 class for formatting strings for console or markup output
a formatter
class (R6 class)
new()
formatter$new(level = "INFO")
level
The text message type to initialize messaging to
none Nothing is returned
format a string for console or markup output
wrap_text()
formatter$wrap_text(txt, style, appendTo = "")
txt
string to wrap in a style
style
string name of a styles key
appendTo
sting to appended the styled text to
txt = formatter::wrap_text("My Title","h1","")
clone()
The objects of this class are cloneable with this method.
formatter$clone(deep = FALSE)
deep
Whether to make a deep clone.
f = formatter$new()
formatted_text = f$wrap_text("text","h1","example ")
Initialize object
## ------------------------------------------------
## Method `formatter$wrap_text`
## ------------------------------------------------
txt = formatter::wrap_text("My Title","h1","")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.