R4DS-2e Ch. 25

geom_smooth()

{ggplot2}

create smoothed lines to plot

length()

{base}

return number of elements in a vector

geom_freqpoly()

{ggplot2}

create frequency polygon

abs()

{base}

calculate absolute value

year()

{lubridate}

return or set year component of a date-time

max()

{base}

compute maxima of input values

mean()

{base}

calculate mean of elements of vector

geom_bar()

{ggplot2}

create bar chart based on counts in data

str_detect()

{stringr}

detect presence of pattern in string

file.info()

{base}

extract file information

group_by()

{dplyr}

group data by levels of column

sum()

{base}

sum elements of vector

c()

{base}

create vector of numbers, characters, etc.

is.na()

{base}

determine whether elements of vector are missing

geom_histogram()

{ggplot2}

create histogram of counts as bars

log10()

{base}

compute base 10 logarithm

rep()

{base}

create repetitions of numbers, characters, etc.

distinct()

{dplyr}

select only unique/distinct rows from data frame

mutate()

{dplyr}

create or modify data columns

library()

{base}

load R packages

aes()

{ggplot2}

create aesthetic mappings between data and plot

min()

{base}

compute minima of input values

as.numeric()

{base}

coerce object to numeric

case_when()

{dplyr}

conditionally set values across multiple conditions

after_stat()

{ggplot2}

evaluate aesthetic mapping after statistical transformation

geom_point()

{ggplot2}

add layer of points to plot

cut()

{base}

divide range of vector into intervals

labs()

{ggplot2}

modify axis, legend, and plot labels

month()

{lubridate}

return or set month component of a date-time

rnorm()

{stats}

generate random sample from normal distribution

sort()

{base}

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

if_else()

{dplyr}

vectorized if statement that checks conditionals and returns different outputs based on answer

pivot_wider()

{tidyr}

pivot data frame to be wider

fixed()

{stringr}

compare literal bytes in a string

data()

{utils}

load specific data set

count()

{dplyr}

count unique values of variables

runif()

{stats}

generate random number from uniform distribution

ggplot()

{ggplot2}

create a plotting area

str_remove_all()

{stringr}

remove all instances of a pattern in a string

str_length()

{stringr}

returns number of characters in a string

fct_rev()

{forcats}

reverse order of factor levels

range()

{base}

return vector of minimum and maximum

facet_wrap()

{ggplot2}

create subplots from one variable

str_to_upper()

{stringr}

change text to upper case

fill()

{tidyr}

fill in missing values

filter()

{dplyr}

keep rows based on values of columns

median()

{stats}

compute sample median

n()

{dplyr}

return current group size

day()

{lubridate}

get days component of date-time

summarize()

{dplyr}

summarize data usually by grouping variable

str_sub()

{stringr}

extract parts of a string

str_flatten()

{stringr}

flatten a string

arrange()

{dplyr}

change order of rows based on values of columns

fct_infreq()

{forcats}

reorder factor levels in the order of most to least frequent

select()

{dplyr}

keep specified columns

sd()

{stats}

compute standard deviation

tibble()

{tibble}

create tibble

The end!