psyteachr_dsrr Ch. 07

count()

{dplyr}

count unique values of variables

ungroup()

{dplyr}

remove grouping

pivot_longer()

{tidyr}

pivot data frame to be longer

data()

{utils}

load specific data set

filter()

{dplyr}

keep rows based on values of columns

desc()

{dplyr}

order in descending order

sum()

{base}

sum elements of vector

is.na()

{base}

determine whether elements of vector are missing

as.integer()

{base}

coerce to integer

pivot_wider()

{tidyr}

pivot data frame to be wider

pull()

{dplyr}

extract a single column

max()

{base}

compute maxima of input values

group_by()

{dplyr}

group data by levels of column

library()

{base}

load R packages

n()

{dplyr}

return current group size

case_when()

{dplyr}

conditionally set values across multiple conditions

read_csv()

{readr}

read comma delimited files

min()

{base}

compute minima of input values

c()

{base}

create vector of numbers, characters, etc.

geom_bar()

{ggplot2}

create bar chart based on counts in data

aes()

{ggplot2}

create aesthetic mappings between data and plot

mutate()

{dplyr}

create or modify data columns

list()

{base}

create recursive vector (list)

round()

{base}

round values to specified number of digits

geom_histogram()

{ggplot2}

create histogram of counts as bars

str_detect()

{stringr}

detect presence of pattern in string

select()

{dplyr}

keep specified columns

as.character()

{base}

coerce object to character

as.factor()

{base}

coerce object to factor

factor()

{base}

encode vector as factor

str()

{utils}

return object structure

as.numeric()

{base}

coerce object to numeric

mean()

{base}

calculate mean of elements of vector

year()

{lubridate}

return or set year component of a date-time

across()

{dplyr}

apply transformation across multiple columns

paste()

{base}

concatenate character vectors with space between elements

head()

{utils}

return first rows of matrix, data frame, etc.

facet_wrap()

{ggplot2}

create subplots from one variable

tibble()

{tibble}

create tibble

na_if()

{dplyr}

replace values with NA

ggplot()

{ggplot2}

create a plotting area

left_join()

{dplyr}

join two data sets keeping the observations in the left one

arrange()

{dplyr}

change order of rows based on values of columns

drop_na()

{tidyr}

drop rows containing missing values

labs()

{ggplot2}

modify axis, legend, and plot labels

The end!