formattable.logical: Create a formattable logical vector

Description Usage Arguments Value Examples

View source: R/formattable.R

Description

Create a formattable logical vector

Usage

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

Arguments

x

a logical vector.

...

arguments to be passed to formatter.

formatter

formatting function, formattable::ifelse 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 logical vector.

Examples

1
2
3
4
5
6
logi <- c(TRUE, TRUE, FALSE)
flogi <- formattable(logi, "yes", "no")
flogi
!flogi
any(flogi)
all(flogi)

Example output

[1] yes yes no 
[1] no  no  yes
[1] yes
[1] no

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