formattable.default: Create a formattable object

Description Usage Arguments Value Examples

View source: R/formattable.R

Description

Create a formattable object

Usage

1
2
## Default S3 method:
formattable(x, ..., formatter, preproc = NULL, postproc = NULL)

Arguments

x

an object.

...

arguments to be passed to formatter.

formatter

formatting function, formatC 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 object that inherits from the original object.

Examples

1
formattable(rnorm(10), formatter = "formatC", digits = 1)

Example output

 [1] -0.08 0.3   -1    -0.2  0.8   0.2   0.2   -0.2  -1     3   

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