Create a formattable object

# S3 method for default
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

formattable(rnorm(10), formatter = "formatC", digits = 1)
#>  [1] 0.6   0.1    1    0.5   -0.4  0.4    1    0.5   -0.9  -0.01