tbl_group_variables | R Documentation |
Create grouping variable
tbl_group_variables( data, group_variables = NULL, group_name = "group", override_group_name = F, sep = "|", remove = T )
group_variables |
vector of grouping variables |
group_name |
name of new column |
override_group_name |
|
sep |
separator |
remove |
remove original columns |
'tibble'
library(tidyverse) library(asbtools) diamonds %>% tbl_group_variables(group_variables = c("cut", "clarity")) diamonds %>% tbl_group_variables(group_variables = c("cut", "clarity"), group_name = NULL) diamonds %>% tbl_group_variables(group_variables = c("cut", "clarity"), group_name = NULL, remove = F)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.