lgl_str: Convert logical variable to string

Description Usage Arguments Value Examples

Description

Converts a logical variable into a string representation.

Usage

1
lgl_str(lgl, case = NULL)

Arguments

lgl

logical: the value to be converted to a string.

case

character: case of the output ("title", "lower" or "upper").

Value

character: the logical value as a string, i.e. "yes" or "no", formatted according to the specified case option.

Examples

1
2
3
lgl_str(FALSE)                 # => "No"
lgl_str(TRUE, case = "upper")  # => "YES"
lgl_str(FALSE, case = "lower") # => "no"

toniprice/jutebag documentation built on May 12, 2019, 4:39 a.m.