decorations_groups.data.frame {yamlet} | R Documentation |
Recover Groups Decorations for Data Frame
Description
Recovers groups decorations for class 'data.frame'.
Seeks a sequentially-valued integer attribute
with name 'groups' for each column, sorts these,
and returns a character vector like group_vars(x)
.
Usage
## S3 method for class 'data.frame'
decorations_groups(x, ...)
Arguments
x |
data.frame |
... |
ignored |
Value
character: names of groups columns
See Also
Other decorate:
as_decorated.default()
,
as_decorated()
,
decorate.character()
,
decorate.data.frame()
,
decorate.list()
,
decorate_groups.data.frame()
,
decorate_groups()
,
decorate()
,
decorations.data.frame()
,
decorations_groups()
,
decorations()
,
group_by_decorations.data.frame()
,
group_by_decorations()
,
redecorate()
Examples
library(magrittr)
library(dplyr)
Theoph %<>% group_by(Subject, Time)
Theoph %>% group_vars
Theoph %>% decorations_groups # nothing!
Theoph %<>% decorate_groups
Theoph %>% decorations_groups # something!
Theoph %<>% ungroup
Theoph %>% group_vars # gone!
Theoph %<>% group_by(across(all_of(decorations_groups(.))))
Theoph %>% group_vars # recovered!
Theoph %<>% group_by_decorations
Theoph %>% group_vars # same
rm(Theoph)
[Package yamlet version 1.0.3 Index]