is_vector {tester}R Documentation

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

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

[Package tester version 0.2.0 Index]