Description Usage Arguments Value Examples
View source: R/add_group_indices.R
Group a data frame and add per-group indices as a column.
1 | add_group_indices(.data, groupingVars, indexColumn)
|
.data |
data.frame |
groupingVars |
character vector of column names to group by. |
indexColumn |
character name of column to add indices to. |
.data with group identifying column added.
1 | add_group_indices(datasets::mtcars, c("cyl", "gear"), 'groupID')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.