psyteachr_ads Ch. 04

sum()

{base}

sum elements of vector

year()

{lubridate}

return or set year component of a date-time

theme()

{ggplot2}

customize non-data components of plot

c()

{base}

create vector of numbers, characters, etc.

read_csv()

{readr}

read comma delimited files

geom_line()

{ggplot2}

add layer of data lines to plot

clean_names()

{janitor}

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

colnames()

{base}

retrieve or set column names

group_by()

{dplyr}

group data by levels of column

aes()

{ggplot2}

create aesthetic mappings between data and plot

geom_hline()

{ggplot2}

plot horizontal reference line

ungroup()

{dplyr}

remove grouping

facet_wrap()

{ggplot2}

create subplots from one variable

as.integer()

{base}

coerce to integer

arrange()

{dplyr}

change order of rows based on values of columns

dput()

{base}

write an ASCII text representation of object

head()

{utils}

return first rows of matrix, data frame, etc.

desc()

{dplyr}

order in descending order

str_extract()

{stringr}

extract first matching patterns in a string

mean()

{base}

calculate mean of elements of vector

mutate()

{dplyr}

create or modify data columns

library()

{base}

load R packages

ggplot()

{ggplot2}

create a plotting area

count()

{dplyr}

count unique values of variables

filter()

{dplyr}

keep rows based on values of columns

round()

{base}

round values to specified number of digits

labs()

{ggplot2}

modify axis, legend, and plot labels

n()

{dplyr}

return current group size

The end!