| decorate_groups.data.frame | R Documentation |
Captures groups as decorations for class 'data.frame'.
Creates a sequentially-valued integer attribute
with name 'groups' for each corresponding column
(after clearing all such existing designations).
It is an error if not all such columns are present.
Defaults to groups(x). If no columns are
specified and x has no groups, x is returned
with any existing column-level 'groups' attributes
removed.
## S3 method for class 'data.frame'
decorate_groups(x, ...)
x |
data.frame |
... |
unquoted names of columns to assign as groups; defaults to |
same class as x
Other decorate:
as_decorated(),
as_decorated.default(),
decorate(),
decorate.character(),
decorate.data.frame(),
decorate.list(),
decorate_groups(),
decorations(),
decorations.data.frame(),
decorations_groups(),
decorations_groups.data.frame(),
group_by_decorations(),
group_by_decorations.data.frame(),
redecorate()
library(magrittr)
library(dplyr)
Theoph %>% decorate_groups(Subject, Time) %>% groups # nothing!
Theoph %>% decorate_groups(Subject, Time) %>% decorations # note well
Theoph %>% group_by(Subject, Time) %>% decorate_groups %>% decorations # same
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.