Retrieve the (reference) groups to which the observations belong.
methods
group_levels(object)group_names(object)group_rows(object)group_length(object)group_size(object)group_indices(object)is_assigned(object)any_assigned(object)all_assigned(object)## S4 method for signature 'ReferenceGroups'group_levels(object)## S4 method for signature 'ReferenceGroups'group_names(object)## S4 method for signature 'ReferenceGroups'group_indices(object)## S4 method for signature 'ReferenceGroups'group_rows(object)## S4 method for signature 'ReferenceGroups'group_length(object)## S4 method for signature 'ReferenceGroups'group_size(object)## S4 method for signature 'ReferenceGroups'is_assigned(object)## S4 method for signature 'ReferenceGroups'any_assigned(object)## S4 method for signature 'ReferenceGroups'all_assigned(object)
Arguments
object: A grouped object.
Functions
group_levels(ReferenceGroups): returns a character vector giving the group names.
group_names(ReferenceGroups): returns a character vector giving the name of the group that each observation belongs to.
group_indices(ReferenceGroups): returns an integer vector giving the group that each value belongs to.
group_rows(ReferenceGroups): returns a list of integer vectors giving the observation that each group contains.
group_length(ReferenceGroups): gives the total number of groups.
group_size(ReferenceGroups): gives the size of each group.
is_assigned(ReferenceGroups): returns a logical vector specifying whether or not an observation belongs to a group.
any_assigned(ReferenceGroups): returns an logical scalar specifying if any observation belongs to a group.
all_assigned(ReferenceGroups): returns an logical scalar specifying if all observations belong to a group.
Examples
## Data from Aitchison 1986data("slides")## Coerce to compositional datacoda <- as_composition(slides, groups =2)## Grouping metadatagroup_levels(coda)group_names(coda)group_indices(coda)group_rows(coda)group_length(coda)group_size(coda)
See Also
Other grouping methods: group(), group_split(), group_subset()