Learn R Programming

tester (version 0.2.0)

is_single_logical: Is single logical

Description

Tests if an object is a single logical

Usage

is_single_logical(x)

Arguments

x

an R object

See Also

is_single, is_single_true, is_single_false

Examples

Run this code
is_single_logical(TRUE)  # TRUE
is_single_logical(FALSE)  # TRUE
is_single_logical(c(TRUE, FALSE))  # FALSE
is_single_logical(-1.0)  # FALSE
is_single_logical(0)  # FALSE
is_single_logical(NA)  # FALSE

Run the code above in your browser using DataLab