Is vector

Description

is_vector tests if an object is a vector
is_numeric_vector tests if an object is a numeric vector
is_string_vector tests if an object is a string vector
is_logical_vector tests if an object is a logical vector
is_not_vector tests if an object is not a vector

Arguments

x

an R object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
a = 1:10
b = letters[1:10]
d = matrix(1:10, 5, 2)

is_vector(a) # TRUE
is_vector(b) # TRUE
is_vector(d) # FALSE
is_not_vector(d) # TRUE

is_numeric_vector(a) # TRUE
is_numeric_vector(b) # FALSE

is_string_vector(a) # FALSE
is_string_vector(b) # TRUE

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.