add_group_id | R Documentation |
Add a column of useful IDs (group IDs, row IDs & consecutive IDs)
add_group_id(.data, ...)
## S3 method for class 'data.frame'
add_group_id(
.data,
...,
.order = group_by_order_default(.data),
.ascending = TRUE,
.by = NULL,
.cols = NULL,
.name = NULL,
as_qg = FALSE
)
add_row_id(.data, ...)
## S3 method for class 'data.frame'
add_row_id(
.data,
...,
.ascending = TRUE,
.by = NULL,
.cols = NULL,
.name = NULL
)
add_consecutive_id(.data, ...)
## S3 method for class 'data.frame'
add_consecutive_id(
.data,
...,
.order = group_by_order_default(.data),
.by = NULL,
.cols = NULL,
.name = NULL
)
.data |
A data frame. |
... |
Additional groups using tidy |
.order |
Should the groups be ordered? |
.ascending |
Should the order be ascending or descending?
The default is |
.by |
Alternative way of supplying groups using |
.cols |
(Optional) alternative to |
.name |
Name of the added ID column which should be a
character vector of length 1.
If |
as_qg |
Should the group IDs be returned as a
collapse "qG" class? The default ( |
A data frame with the requested ID column.
group_id row_id f_consecutive_id
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.