psyteachr_ads Ch. 09

pull()

{dplyr}

extract a single column

ungroup()

{dplyr}

remove grouping

sum()

{base}

sum elements of vector

geom_bar()

{ggplot2}

create bar chart based on counts in data

ggplot()

{ggplot2}

create a plotting area

mutate()

{dplyr}

create or modify data columns

case_when()

{dplyr}

conditionally set values across multiple conditions

min()

{base}

compute minima of input values

tibble()

{tibble}

create tibble

max()

{base}

compute maxima of input values

str()

{utils}

return object structure

aes()

{ggplot2}

create aesthetic mappings between data and plot

left_join()

{dplyr}

join two data sets keeping the observations in the left one

as.numeric()

{base}

coerce object to numeric

c()

{base}

create vector of numbers, characters, etc.

as.character()

{base}

coerce object to character

labs()

{ggplot2}

modify axis, legend, and plot labels

round()

{base}

round values to specified number of digits

is.na()

{base}

determine whether elements of vector are missing

arrange()

{dplyr}

change order of rows based on values of columns

str_detect()

{stringr}

detect presence of pattern in string

geom_histogram()

{ggplot2}

create histogram of counts as bars

read_csv()

{readr}

read comma delimited files

drop_na()

{tidyr}

drop rows containing missing values

factor()

{base}

encode vector as factor

mean()

{base}

calculate mean of elements of vector

across()

{dplyr}

apply transformation across multiple columns

desc()

{dplyr}

order in descending order

facet_wrap()

{ggplot2}

create subplots from one variable

year()

{lubridate}

return or set year component of a date-time

library()

{base}

load R packages

paste()

{base}

concatenate character vectors with space between elements

n()

{dplyr}

return current group size

select()

{dplyr}

keep specified columns

pivot_longer()

{tidyr}

pivot data frame to be longer

head()

{utils}

return first rows of matrix, data frame, etc.

data()

{utils}

load specific data set

filter()

{dplyr}

keep rows based on values of columns

na_if()

{dplyr}

replace values with NA

group_by()

{dplyr}

group data by levels of column

pivot_wider()

{tidyr}

pivot data frame to be wider

count()

{dplyr}

count unique values of variables

as.factor()

{base}

coerce object to factor

The end!