R4DS-2e Ch. 21

day()

{lubridate}

get days component of date-time

library()

{base}

load R packages

dbGetQuery()

{DBI}

return results of database query as data frame

filter()

{dplyr}

keep rows based on values of columns

tbl()

{dplyr}

create a database table from data source

n()

{dplyr}

return current group size

cut()

{base}

divide range of vector into intervals

mean()

{base}

calculate mean of elements of vector

group_by()

{dplyr}

group data by levels of column

month()

{lubridate}

return or set month component of a date-time

c()

{base}

create vector of numbers, characters, etc.

collect()

{dplyr}

retrieve data from a database into a local tibble

arrange()

{dplyr}

change order of rows based on values of columns

dbWriteTable()

{DBI}

write a data frame to database table

lead()

{dplyr}

find the next values in a vector

relocate()

{dplyr}

change column order

lag()

{dplyr}

find the previous values in a vector

left_join()

{dplyr}

join two data sets keeping the observations in the left one

case_when()

{dplyr}

conditionally set values across multiple conditions

if_else()

{dplyr}

vectorized if statement that checks conditionals and returns different outputs based on answer

show_query()

{dplyr}

give details about database table object

summarize()

{dplyr}

summarize data usually by grouping variable

desc()

{dplyr}

order in descending order

median()

{stats}

compute sample median

select()

{dplyr}

keep specified columns

is.na()

{base}

determine whether elements of vector are missing

dbConnect()

{DBI}

create connection to database

as_tibble()

{tibble}

coerce object into tibble

mutate()

{dplyr}

create or modify data columns

year()

{lubridate}

return or set year component of a date-time

rename()

{dplyr}

rename columns

dbReadTable()

{DBI}

read database table to data frame

The end!