Learn R Programming

DEXiR (version 1.0.2)

dexi_bool: dexi_bool

Description

Convert a DEXi string to logical. "TRUE", "T" and "1" are interpreted as TRUE, all other strings as FALSE.

Usage

dexi_bool(x)

Value

logical(1).

Arguments

x

character(1).

Examples

Run this code
dexi_bool("TRUE")
sapply(c("TRUE", "T", "1", TRUE, 1, "FALSE", "F", "0", NULL, NA, NaN), dexi_bool)

Run the code above in your browser using DataLab