Using R Flashcards

1
Q
What is the order of operation of the following numerical operators?
/ division
\+ summation 
- subtraction 
* multiplication 
^ power
A
^ power
* multiplication 
/ division
\+ summation 
- subtraction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
What is the order of operation of the following numerical operators?
/ division
\+ summation 
- subtraction 
* multiplication 
^ power
A
^ power
* multiplication 
/ division
\+ summation 
- subtraction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

!=

What is the meaning of these two logical operators:

A
  • Not equal to

- Equal to

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

In R, what does | mean?

A

OR

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

What is the default number of decimal places for the round() function?

A

0

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

Name the three types of variables in R

A
  1. Numeric
  2. Character
  3. Logical
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In R, what is the assignment operator?

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

In R, a variable can begin with a non-alpha-numeric character?

A

Only a period, but not other non-alpha-numeric characters

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

In R, what is the name for a variable that contains more than one variable?

A

A vector

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

In R, the values within a vector recalled what?

A

Elements

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

In R, how would you use logical statements to call individual elements from a vector?

A

Like this:

vector name [vector name <0.90]

Which pulls all the elements in that vector that are less than 0.9

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

In R, what does | mean?

A

OR

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

What is the default number of decimal places for the round() function?

A

0

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

In R, what function do you use to load a package

A

library()

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

In R, what is the assignment operator?

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

In R, a variable can begin with a non-alpha-numeric character?

A

Only a period, but not other non-alpha-numeric characters

17
Q

In R, what is the name for a variable that contains more than one variable?

A

A vector

18
Q

In R, the values within a vector recalled what?

A

Elements

19
Q

In R, how would you use logical values to call individual elements from a vector?

A

like this:

vector name[c(TRUE, TRUE, FALSE)]

Which means it won’t call the third element of the vector

20
Q

In R, if you want to pull/inspect a specific variable in a data frame, which symbol do you use?

A

$

As in:
dataframe&examplevariable

21
Q

Factor variables are nominal categorical variables, T/F

Provide an example

A

TRUE

Eye colour or sex

22
Q

In R, what function do you use to load a package

A

library()

23
Q

In R, what function do you use to install a package

A

install.packages()

24
Q

In R, what function do you use to load a dataframe

A

load()

25
Q

In R, what function do you use to convert factor variables to numeric type (which you might do for the purposes of a computation)

A

as.numeric()

26
Q

When dummy coding in R, what is the name of the category that will have 0 in all three dummy variables?

A

The ‘reference category’

27
Q

When you are investigating group difference…

and there is only one axis along which groups can differ (ie hair colour)

What is the label you give to this type of design?

A

A ‘one-way’ etc etc design

as in a ‘One-way between-subjects design’

28
Q

When you are investigating group difference…

and the groups are independent…

What is the label you give to this type of design?

A

A etc etc ‘between-subjects’ design

as in a ‘One-way between-subjects design’

29
Q

What does ANOVA stand for?

A

Analysis of Variance

30
Q

What is the null hypothesis (H0) of an ANOVA?

A

That the means for each group are the same

31
Q

If you are comparing the means of five groups on a continuous measure, how many degrees of freedom do you have?

A

Four

Because in this instance:

df = k - 1

Where k = number of groups

32
Q

What is a linear contrast?

A

A set of weights that sum to zero?

33
Q

What is the name of a set of weights that sum to zero?

A

A linear contrast