psyteachr_dsrr Ch. 02

ggplot()

{ggplot2}

create a plotting area

nrow()

{base}

return number of rows in matrix, data frame, etc.

labs()

{ggplot2}

modify axis, legend, and plot labels

aes()

{ggplot2}

create aesthetic mappings between data and plot

n()

{dplyr}

return current group size

today()

{lubridate}

return the current date

read_csv()

{readr}

read comma delimited files

library()

{base}

load R packages

mean()

{base}

calculate mean of elements of vector

Sys.Date()

{base}

return system date

tribble()

{tibble}

create row-wise tibble

count()

{dplyr}

count unique values of variables

geom_point()

{ggplot2}

add layer of points to plot

as.Date()

{base}

convert to date

year()

{lubridate}

return or set year component of a date-time

The end!