A virtual S4 class to represent reference groups.
class
is_grouped(object)
Arguments
object: A ReferenceGroups object.
Slots
group_indices: An integer vector to store the group that each value belongs to.
group_levels: A character vector to store the values of the grouping variables.
Examples
## Data from Aitchison 1986data("hongite")## Coerce to compositional datacoda <- as_composition(hongite)## codaccessdim(coda)# Get the matrix dimensionsrow(coda)# Get the row indexescol(coda, as.factor =TRUE)# Get the column indexesnrow(coda)# Get the number of rowsncol(coda)# Get the number of columnsdimnames(coda)# Get the dimension namesrownames(coda)<- LETTERS[1:25]# Set the row namesrownames(coda)# Get the rownamescolnames(coda)<- letters[21:25]# Set the column namescolnames(coda)# Get the column names
See Also
Other classes: CompositionMatrix-class, GroupedComposition-class, GroupedLogRatio-class, LogRatio-class, NumericMatrix-class, OutlierIndex-class