ReferenceGroups-class function

Grouped Data

Grouped Data

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 1986 data("hongite") ## Coerce to compositional data coda <- as_composition(hongite) ## codaccess dim(coda) # Get the matrix dimensions row(coda) # Get the row indexes col(coda, as.factor = TRUE) # Get the column indexes nrow(coda) # Get the number of rows ncol(coda) # Get the number of columns dimnames(coda) # Get the dimension names rownames(coda) <- LETTERS[1:25] # Set the row names rownames(coda) # Get the rownames colnames(coda) <- letters[21:25] # Set the column names colnames(coda) # Get the column names

See Also

Other classes: CompositionMatrix-class, GroupedComposition-class, GroupedLogRatio-class, LogRatio-class, NumericMatrix-class, OutlierIndex-class

Author(s)

N. Frerebeau