Variables - R (Creating Variables in R) Flashcards

1
Q

13) Variables are containers for storing data values.

A

Variables

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

14) R does not have a command for declaring a variable.

A

Variables

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

15) Variable is created the moment you first assign a value to it.

A

Variables

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

16) To assign a value to a variable, use the <- sign.

A

Variables <-

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

17) To output (or print) the variable value, just type the variable name:

A

variable name or print()

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

18) In other programming language, it is common to use = as an assignment operator. In R, we can use both = and <- as assignment operators.

A

= and <-

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

19) However, <- is preferred in most cases because the = operator can be forbidden in some contexts in R.

A

<- or =

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