get_groups | R Documentation |
Get grouping structure based on a data frame of categories. The data frame allows for any number of grouping variables, where each row is a unique entry based on potentially multiple groups.
get_groups(data, collapsecharacter = "-")
data |
A data frame with a potentially infinite number of columns
and one row per unique entries. Columns can be named anything you desire,
but |
collapsecharacter |
A character value that will be used to paste names
together. The default is |
A vector of unique names based on row entries.
Kelli F. Johnson
get_groups(data.frame(group = c("North", "South")))
get_groups(data.frame(
area = c("North", "South"),
depth = c("inshore", "offshore")
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.