flextable (version 0.5.5)

colformat_lgl: format logical cells

Description

Format logical cells in a flextable.

Usage

colformat_lgl(x, ...)

# S3 method for flextable colformat_lgl(x, col_keys, true = "true", false = "false", na_str = "", prefix = "", suffix = "", ...)

Arguments

x

a flextable object

...

additional arguments, i can be used to specify a row selector.

col_keys

names of the colkeys

false, true

string to be used for logical

na_str

string to be used for NA values

prefix

string to be used as prefix or suffix

suffix

string to be used as prefix or suffix

See Also

Other cells formatters: colformat_char, colformat_int, colformat_num, compose

Examples

Run this code
# NOT RUN {
dat <- data.frame(a = c(TRUE, FALSE), b = c(FALSE, TRUE))

ft <- flextable(dat)
ft <- colformat_lgl(x = ft, col_keys = c("a", "b"))
autofit(ft)
# }

Run the code above in your browser using DataLab