R4DS-2e Ch. 26

possibly()

{purrr}

safely return result or default when there is an error

ggsave()

{ggplot2}

save a ggplot

sd()

{stats}

compute standard deviation

tibble()

{tibble}

create tibble

walk2()

{purrr}

apply multiple functions over two arguments in parallel, only for side effects

if_any()

{dplyr}

apply function to columns and return TRUE if any values are TRUE

parse_number()

{readr}

parse a character vector to numbers

walk()

{purrr}

apply a function to multiple elements of an object to obtain side effects

median()

{stats}

compute sample median

str_glue()

{stringr}

format and interpolate a string with glue

mday()

{lubridate}

extract day number of month

any()

{base}

assess whether conditional is true for any elements of a vector

geom_histogram()

{ggplot2}

create histogram of counts as bars

across()

{dplyr}

apply transformation across multiple columns

sum()

{base}

sum elements of vector

names()

{base}

return (and can assign) column names

everything()

{tidyselect}

select all variables

if_all()

{dplyr}

apply function to columns and return TRUE if all values are TRUE

is.numeric()

{base}

determine if input is of type numeric

rep()

{base}

create repetitions of numbers, characters, etc.

filter()

{dplyr}

keep rows based on values of columns

pivot_longer()

{tidyr}

pivot data frame to be longer

sample()

{base}

randomly sample from vector

count()

{dplyr}

count unique values of variables

is.na()

{base}

determine whether elements of vector are missing

mutate()

{dplyr}

create or modify data columns

set_names()

{magrittr}

set names of object

ymd()

{lubridate}

parse dates with year, month, and day components

runif()

{stats}

generate random number from uniform distribution

coalesce()

{dplyr}

combine vectors by returning the first non-missing value at each position

c()

{base}

create vector of numbers, characters, etc.

ggplot()

{ggplot2}

create a plotting area

list()

{base}

create recursive vector (list)

day()

{lubridate}

get days component of date-time

mean()

{base}

calculate mean of elements of vector

summarize()

{dplyr}

summarize data usually by grouping variable

rnorm()

{stats}

generate random sample from normal distribution

pivot_wider()

{tidyr}

pivot data frame to be wider

dbConnect()

{DBI}

create connection to database

aes()

{ggplot2}

create aesthetic mappings between data and plot

read_excel()

{readxl}

import either xls or xlsx Excel files

map_int()

{purrr}

apply a function to multiple elements of an object in purrr, return a integer vector

tbl()

{dplyr}

create a database table from data source

library()

{base}

load R packages

map()

{purrr}

apply a function to multiple elements of an object in purrr, return a list

cut()

{base}

divide range of vector into intervals

month()

{lubridate}

return or set month component of a date-time

n()

{dplyr}

return current group size

select()

{dplyr}

keep specified columns

length()

{base}

return number of elements in a vector

group_by()

{dplyr}

group data by levels of column

year()

{lubridate}

return or set year component of a date-time

map_chr()

{purrr}

apply a function to multiple elements of an object in purrr, return a character vector

write_csv()

{readr}

write data frame to comma delimited file

data()

{utils}

load specific data set

The end!