nest_by {poorman} | R Documentation |
Nest By
Description
nest_by()
is similar to group_by()
however instead of storing the group structure in the metadata, it is made
explicit in the data. Each group key is given a single row within the data.frame
and the group's data is stored
within a list-column of the data.frame
.
Usage
nest_by(.data, ..., .key = "data", .keep = FALSE)
Arguments
.data |
A |
... |
Grouping specification, forwarded to |
.key |
|
.keep |
|
Details
Currently there is no pretty-printing provided for the results of nest_by()
and they are not useable with other
functions such as mutate()
.
Examples
mtcars %>% nest_by(am, cyl)
# Or equivalently
mtcars %>% group_by(am, cyl) %>% nest_by()
[Package poorman version 0.2.7 Index]