fmt_lgl_cols()
uses vec_fmt_lgl()
to format all (or specified) logical
vector columns to use replacement values.
Arguments
- .data
A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See Methods, below, for more details.
- .cols
<
tidy-select
> Columns to transform. You can't select grouping columns because they are already automatically handled by the verb (i.e.summarise()
ormutate()
).- values
Default to
c("Y", "N")
Length 2 vector where first element replacesTRUE
and the second element replacesFALSE
.
Examples
fmt_lgl_cols(data.frame(x = c(TRUE, FALSE, TRUE)))
#> x
#> 1 Y
#> 2 N
#> 3 Y