psyteachr_dsrr Ch. 04

geom_hline()

{ggplot2}

plot horizontal reference line

library()

{base}

load R packages

group_by()

{dplyr}

group data by levels of column

labs()

{ggplot2}

modify axis, legend, and plot labels

theme()

{ggplot2}

customize non-data components of plot

sum()

{base}

sum elements of vector

n()

{dplyr}

return current group size

count()

{dplyr}

count unique values of variables

facet_wrap()

{ggplot2}

create subplots from one variable

filter()

{dplyr}

keep rows based on values of columns

as.integer()

{base}

coerce to integer

desc()

{dplyr}

order in descending order

ggplot()

{ggplot2}

create a plotting area

head()

{utils}

return first rows of matrix, data frame, etc.

arrange()

{dplyr}

change order of rows based on values of columns

clean_names()

{janitor}

clean data frame column names to be unique and consistent of only characters, numbers and _

geom_line()

{ggplot2}

add layer of data lines to plot

aes()

{ggplot2}

create aesthetic mappings between data and plot

dput()

{base}

write an ASCII text representation of object

mean()

{base}

calculate mean of elements of vector

str_extract()

{stringr}

extract first matching patterns in a string

year()

{lubridate}

return or set year component of a date-time

mutate()

{dplyr}

create or modify data columns

round()

{base}

round values to specified number of digits

read_csv()

{readr}

read comma delimited files

colnames()

{base}

retrieve or set column names

ungroup()

{dplyr}

remove grouping

c()

{base}

create vector of numbers, characters, etc.

The end!