Learn R Programming

formattable (version 0.2.1)

formattable.logical: Create a formattable logical vector

Description

Create a formattable logical vector

Usage

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

Run this code
# NOT RUN {
logi <- c(TRUE, TRUE, FALSE)
flogi <- formattable(logi, "yes", "no")
flogi
!flogi
any(flogi)
all(flogi)
# }

Run the code above in your browser using DataLab