Data Manipulation in R Flashcards

1
Q

This is a conditional statement we use in R.

A

ifelse

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

Is calculated by taking the sum of the values and dividing with the number of values in a data series.

A

Mean

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

Is a measure of how far away items in a data set are from the mean.

A

Standard deviation

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

If there are missing values, then the mean and sd functions returns what output?

A

NA

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

This function is used to produce mean, median, minimum, maximum, 1st and 3rd quartile.

A

summary

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

This package allows you to use the forward-pipe chaining operator (%>%) for combining multiple operations.

A

dplyr

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

Use _____ to ______ data with the required condition.

A

Filter, Filter

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

This function is used to reorder rows.

A

arrange

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

This function is used in picking variables.

A

select

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

This function is used to change the name of the column(s).

A

rename

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

This function is used to add new variables that are functions of existing variables.

A

mutate

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

This function is used to find insights from the data.

A

summarise

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

This two functions are used in taking random samples.

A

sample.n and sample.frac

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

To drop the missing values, what syntax do you use?

A

na.rm = TRUE

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

How do we write the syntax of an if-else statement?

A

ifelse(<condition>, <true>, <false>)</false></true></condition>

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