Learn R Programming

quickcode (version 1.0.6)

not.logical: Not logical

Description

Opposite of is.logical(). Check if entry is a logical object

Usage

not.logical(x)

Value

a boolean value to indicate if entry is logical

Arguments

x

vector entry

Examples

Run this code
test.env <- TRUE
test.notenv <- 0
not.logical(test.env) # FALSE
not.logical(test.notenv) # TRUE
if(not.logical(test.notenv)) message("yes") # yes

Run the code above in your browser using DataLab