These five functions form the backbone of dplyr. They are
all S3 generic functions with methods for each individual
data type. All functions work exactly the same way: the
first argument is the tbl, and the subsequence arguments
are interpreted in the context of that tbl.
Usage
filter(.data, ...)
summarise(.data, ...)
mutate(.data, ...)
arrange(.data, ...)
select(.data, ...)
Arguments
.data
a tbl
...
variables interpreted in the context of that
data frame.
Manipulation functions
The five key data manipulation functions are:
filter: return only a subset of the rows.
If multiple conditions are supplied they are combined
with &.
select: return only a subset of the
columns. If multiple columns are supplied they are all
used.
arrange: reorder the rows. Multiple inputs
are ordered from left-to- right.
mutate: add new
columns. Multiple inputs create multiple columns.
summarise: reduce each group to a single row. Multiple
inputs create multiple output summaries.
These are all made significantly more useful when applied
by group, as with group_by
Tbls
dplyr comes with three built-in tbls. Read the help for
the manip methods of that class to get more details: