formattable.factor: Create a formattable factor object

Description Usage Arguments Value Examples

View source: R/formattable.R

Description

Create a formattable factor object

Usage

1
2
## S3 method for class 'factor'
formattable(x, ..., formatter = "vmap", preproc = NULL, postproc = NULL)

Arguments

x

a factor object.

...

arguments to be passed to formatter.

formatter

formatting function, vmap in default.

preproc

pre-processor function that prepares x for formatting function.

postproc

post-processor function that transforms formatted output for printing.

Value

a formattable factor object.

Examples

1
2
formattable(as.factor(c("a", "b", "b", "c")),
  a = "good", b = "fair", c = "bad")

Example output

[1] good fair fair bad 

formattable documentation built on Jan. 13, 2021, 7:17 a.m.