Description Usage Arguments Value Examples
Some modelling software needs group data as an index. This means instead of
c("AU", "AU", "UK", "UK", "NZ") you need c(1, 1, 2, 2, 3),
corresponding to each of the groups. This function makes it simpler to add
that information to a dataframe.
1 | add_group_id(.data, group)
|
.data |
data.frame |
group |
group to add the ID for |
data.frame with additional column named ".group_id", where "group" is
named after the variable you would like to add the group ID for.
1 | malaria_africa_ts %>% add_group_id(country)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.