Working with vectors Flashcards

1
Q

Extract multiple elements

A

vector[c(1, 4, 6)]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Display the data type of a vector

A

typeof(vector)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Assigning name attributes to a vector

A

names(vector)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Extract two elements by name

A

vector[c(“name_1”, “name_2”)]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Logical operators

A

> , =, <=, ==, !=

How well did you know this?
1
Not at all
2
3
4
5
Perfectly