R4DS-2e Ch. 16

n()

{dplyr}

return current group size

factor()

{base}

encode vector as factor

fct_infreq()

{forcats}

reorder factor levels in the order of most to least frequent

month()

{lubridate}

return or set month component of a date-time

geom_line()

{ggplot2}

add layer of data lines to plot

read_csv()

{readr}

read comma delimited files

sort()

{base}

sort a vector or factor into ascending or descending order (base R)

aes()

{ggplot2}

create aesthetic mappings between data and plot

geom_point()

{ggplot2}

add layer of points to plot

scale_color_brewer()

{ggplot2}

map colors to data with ColorBrewer

fct_relevel()

{forcats}

reorder factor levels by hand

mean()

{base}

calculate mean of elements of vector

fct_reorder()

{forcats}

reorder factor levels by sorting along another variable

ggplot()

{ggplot2}

create a plotting area

fct_lump_n()

{forcats}

lump all factor levels except the most frequent

fct_collapse()

{forcats}

collapse factors into manually defined groups

ordered()

{base}

created ordered factor

summarize()

{dplyr}

summarize data usually by grouping variable

fct_recode()

{forcats}

change factor levels by hand

fct_lump_lowfreq()

{forcats}

lump together least frequent levels of a factor

count()

{dplyr}

count unique values of variables

levels()

{base}

view and change factor levels

c()

{base}

create vector of numbers, characters, etc.

group_by()

{dplyr}

group data by levels of column

is.na()

{base}

determine whether elements of vector are missing

fct_reorder2()

{forcats}

reorder factor levels by sorting along another variable with two dimensions

mutate()

{dplyr}

create or modify data columns

labs()

{ggplot2}

modify axis, legend, and plot labels

sum()

{base}

sum elements of vector

filter()

{dplyr}

keep rows based on values of columns

geom_bar()

{ggplot2}

create bar chart based on counts in data

library()

{base}

load R packages

fct_rev()

{forcats}

reverse order of factor levels

The end!