Working with vectors Flashcards
1
Q
Extract multiple elements
A
vector[c(1, 4, 6)]
2
Q
Display the data type of a vector
A
typeof(vector)
3
Q
Assigning name attributes to a vector
A
names(vector)
4
Q
Extract two elements by name
A
vector[c(“name_1”, “name_2”)]
5
Q
Logical operators
A
> , =, <=, ==, !=