icontext {formattable}R Documentation

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

Glyphicons in Bootstrap, Glyphicons

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"))

[Package formattable version 0.2.1 Index]