group_names | R Documentation |
Retrieve the (reference) groups to which the observations belong.
group_names(object)
group_levels(object)
group_factor(object, ...)
group_rows(object)
group_n(object)
group_size(object)
group_indices(object)
## S4 method for signature 'ReferenceGroups'
group_levels(object)
## S4 method for signature 'ReferenceGroups'
group_names(object)
## S4 method for signature 'ReferenceGroups'
group_factor(object, exclude = NA)
## S4 method for signature 'ReferenceGroups'
group_indices(object)
## S4 method for signature 'ReferenceGroups'
group_rows(object)
## S4 method for signature 'ReferenceGroups'
group_n(object)
## S4 method for signature 'ReferenceGroups'
group_size(object)
object |
A grouped R object. |
... |
Currently not used. |
exclude |
A |
group_levels()
returns a character
vector giving the group
names.
group_size()
returns an integer
vector giving the size of each
group.
group_n()
gives the total number of groups.
group_names()
returns a character
vector giving the name of
the group that each observation belongs to.
group_factor()
returns a factor
vector giving the name of
the group that each observation belongs to.
group_indices()
returns an integer
vector giving the group
that each value belongs to.
group_rows()
returns a list
of integer
vectors giving the
observation that each group contains.
N. Frerebeau
Other grouping methods:
group()
,
group_split()
,
group_subset()
,
is_assigned()
## Data from Aitchison 1986
data("slides")
## Coerce to compositional data
coda <- as_composition(slides, groups = 2)
## Grouping metadata
group_levels(coda)
group_names(coda)
group_indices(coda)
group_rows(coda)
group_n(coda)
group_size(coda)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.