psyteachr_dsrr Ch. 03

as.numeric()

{base}

coerce object to numeric

mean()

{base}

calculate mean of elements of vector

scale_x_continuous()

{ggplot2}

scale x axis to be continuous

stat_summary()

{ggplot2}

summarize y values for each x value

theme()

{ggplot2}

customize non-data components of plot

coord_cartesian()

{ggplot2}

use Cartesian coordinates

geom_jitter()

{ggplot2}

add layer of jittered points to plot

ggplot()

{ggplot2}

create a plotting area

facet_wrap()

{ggplot2}

create subplots from one variable

lm()

{stats}

fit linear model

geom_boxplot()

{ggplot2}

add layer of boxplots to plot

scale_x_date()

{ggplot2}

scale x axis to be date

labs()

{ggplot2}

modify axis, legend, and plot labels

geom_smooth()

{ggplot2}

create smoothed lines to plot

geom_bar()

{ggplot2}

create bar chart based on counts in data

c()

{base}

create vector of numbers, characters, etc.

read_csv()

{readr}

read comma delimited files

loess()

{stats}

apply local polynomial regression fitting

geom_freqpoly()

{ggplot2}

create frequency polygon

factor()

{base}

encode vector as factor

seq()

{base}

create sequences of numbers

geom_violin()

{ggplot2}

create violin plot

geom_point()

{ggplot2}

add layer of points to plot

today()

{lubridate}

return the current date

geom_histogram()

{ggplot2}

create histogram of counts as bars

n()

{dplyr}

return current group size

scale_y_continuous()

{ggplot2}

scale y axis to be continuous

aes()

{ggplot2}

create aesthetic mappings between data and plot

now()

{lubridate}

return current date and time

count()

{dplyr}

count unique values of variables

geom_col()

{ggplot2}

create bar chart based on values in data

library()

{base}

load R packages

guides()

{ggplot2}

set guides for scale

The end!