list_of_vectors: List of vectors

Description Arguments See Also Examples

Description

list_of_vectors checks if an object is a list of vectors
list_of_numeric_vectors checks if an object is a list of numeric vectors
list_of_string_vectors checks if an object is a list of string vectors list_of_logical_vectors checks if an object is a list of logical vectors

Arguments

x

an R object

See Also

is_vector, list_with_vectors

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
a = list(1:3, letters[1:3], c(exp(1), pi), NA)
b = list(1:3, c(exp(1), pi))
d = list(letters[1:3], 'bonjour a tous')
e = list(matrix(1:6, 2, 3), a, b)

list_of_vectors(a) # TRUE
list_of_vectors(b) # TRUE
list_of_vectors(d) # TRUE
list_of_vectors(e) # FALSE

list_of_numeric_vectors(a) # FALSE
list_of_numeric_vectors(b) # TRUE

list_of_string_vectors(a) # FALSE
list_of_string_vectors(d) # TRUE

list_of_logical_vectors(a) # FALSE
list_of_logical_vectors(d) # TRUE

Example output

[1] TRUE
[1] TRUE
[1] TRUE
[1] FALSE
[1] FALSE
[1] TRUE
[1] FALSE
[1] TRUE
[1] FALSE
[1] FALSE

tester documentation built on May 2, 2019, 1:09 p.m.