logical_to_str: Convert logical variable to string

View source: R/logical_to_str.R

logical_to_strR Documentation

Convert logical variable to string

Description

Converts a logical variable into a string representation.

Usage

logical_to_str(lgl, case = NULL)

Arguments

lgl

The logical (boolean) value to be converted to a string.

case

Case of the output ("title", "lower" or "upper").

Value

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

Examples

logical_to_str(FALSE) # => "No"
logical_to_str(TRUE, case = "upper") # => "YES"
logical_to_str(FALSE, case = "lower") # => "no"


toniprice/jute documentation built on Jan. 11, 2023, 8:23 a.m.