Building Blocks Flashcards

1
Q

Functions argument?

A

What we pass in the parentheses after the function name

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

What do you use functions to create?

A

Objects (object < - Function ()

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

What are Vector attributes?

A

Names, dimension and classes

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

Indexing and slicing is used for?

A

Selecting values from a vector

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

What can you used indexing & slicing for?

A

Adding a new variable, Editing variables and slicing & indexing Matrices & data frames

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

How do you select a value from an object?

A

vector.name[n]

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

What is the command for slicing?

A

Vector.name[n1 : nk]

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

Why are classes important?

A

Gives R the base information needed to create an object…all object of a class share features

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

What is recycling?

A

Repeating values in order to reach the necessary vector length to complete an operation

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

When indexing a matrix row?

A

You type the index for the row in square brackets then follow by a comma [n, ]

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

When indexing a matrix column

A

You type a comma in square brackets then follow by the index of the column [ ,n ]

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