Learn R Programming

quickcode (version 1.0.6)

not.vector: Not a vector

Description

Opposite of is.vector(). Check if entry is not vector

Usage

not.vector(x)

Value

a boolean value to indicate if entry is vector

Arguments

x

vector entry

Examples

Run this code
vect1 = list(r=1,t=3:10)
vect2 = LETTERS
is.vector(vect1) # TRUE
not.vector(vect1) # FALSE
not.vector(vect2) # FALSE
if(not.vector(vect1)) message("yes") # NULL

Run the code above in your browser using DataLab