Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

icontext

Create icon-text elements


Description

Create icon-text elements

Usage

icontext(
  icon,
  text = list(NULL),
  ...,
  simplify = TRUE,
  provider = getOption("formattable.icon.provider", "glyphicon"),
  class_template = getOption("formattable.icon.class_template",
    "{provider} {provider}-{icon}")
)

Arguments

icon

a character vector or list of character vectors of icon names.

text

a character vector of contents.

...

additional parameters (reserved)

simplify

logical to indicating whether to return the only element if a single-valued list is resulted.

provider

the provider of icon set.

class_template

a character value to specifiy to template of the class with "{provider}" to represent provider value and "{icon}" to represent icon values.

See Also

Examples

icontext("plus")
icontext(c("star","star-empty"))
icontext(ifelse(mtcars$mpg > mean(mtcars$mpg), "plus", "minus"), mtcars$mpg)
icontext(list(rep("star",3), rep("star",2)), c("item 1", "item 2"))

formattable

Create 'Formattable' Data Structures

v0.2.1
MIT + file LICENSE
Authors
Kun Ren [aut, cre], Kenton Russell [aut]
Initial release
2021-01-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.