group_names {nexus} | R Documentation |
Grouping Metadata
Description
Retrieve the (reference) groups to which the observations belong.
Usage
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)
Arguments
object |
A grouped R object. |
... |
Currently not used. |
exclude |
A |
Value
-
group_levels()
returns acharacter
vector giving the group names. -
group_size()
returns aninteger
vector giving the size of each group. -
group_n()
gives the total number of groups. -
group_names()
returns acharacter
vector giving the name of the group that each observation belongs to. -
group_factor()
returns afactor
vector giving the name of the group that each observation belongs to. -
group_indices()
returns aninteger
vector giving the group that each value belongs to. -
group_rows()
returns alist
ofinteger
vectors giving the observation that each group contains.
Author(s)
N. Frerebeau
See Also
Other grouping methods:
group()
,
group_split()
,
group_subset()
,
is_assigned()
Examples
## 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)