R Flashcards

1
Q

Common functions you can use to preview data

A

Colname()
Str()
Glimpse()
Head()

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

Rename()

A

Rename(dataset, col_name = new col_name, col_name2 = new col_name2

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

Ggplot

A

Loaded with tidyverse
Ggplot(data = diamonds, aes(x = carat, y = price)) + geom_point()
Returns graph with carat and price as x and y axes

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

Facet_wrap()

A

Separates out components for a less busy visual

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

Variable

A

<-

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

Vector

A

A group of data elements of the same type stored in a one dimensional sequence in R

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

Pipe

A

%>%
Tool for expressing a sequence of multiple operations

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

Vector

A

group of data elements of the same type, stored in a sequence in R. You cannot have a vector that contains both logicals and numerics.

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

Tibble

A

Tibbles are data. frames that are lazy and surly: they do less (i.e. they don’t change variable names or types, and don’t do partial matching) and complain more (e.g. when a variable does not exist). This forces you to confront problems earlier, typically leading to cleaner, more expressive code.

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

Skim_without_charts(bookings_df)

A

Gives summary info (min, max, empty, average, etc) of each variable type

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

Geom_pount()

A

Creates scatterplots

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

Aes

A

Aesthetics, sets x and y axis, color, how it looks

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

Aes alpha

A

Transparent

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

Changes to all points(not variable dependent)

A

Do it outside the aes() function

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