Tidying

extract

Extract one column into multiple columns.

gather

Gather columns into key-value pairs.

nest

Nest repeated values in a list-variable.

separate

Separate one column into multiple columns.

separate_rows

Separate a collapsed column into multiple rows.

spread

Spread a key-value pair across multiple columns.

unite

Unite multiple columns into one.

unnest

Unnest a list column.

Implicit and explicit missing values

complete

Complete a data frame with missing combinations of data.

drop_na

Drop rows containing missing values

expand crossing crossing_ nesting nesting_

Expand data frame to include all combinations of values

fill

Fill in missing values.

full_seq

Create the full sequence of values in a vector.

replace_na

Replace missing values

Data

smiths

Some data about the Smith family.

table1

Example tabular representations

who

World Health Organization TB data