groups | R Documentation |
Retrieves or defines the (reference) groups to which the observations belong.
groups(object)
groups(object) <- value
any_assigned(object)
is_assigned(object)
## S4 method for signature 'CompositionMatrix'
is_assigned(object)
## S4 method for signature 'LogRatio'
is_assigned(object)
## S4 method for signature 'CompositionMatrix'
any_assigned(object)
## S4 method for signature 'LogRatio'
any_assigned(object)
## S4 method for signature 'CompositionMatrix'
groups(object)
## S4 method for signature 'LogRatio'
groups(object)
## S4 method for signature 'OutlierIndex'
groups(object)
## S4 replacement method for signature 'CompositionMatrix,ANY'
groups(object) <- value
## S4 replacement method for signature 'CompositionMatrix,list'
groups(object) <- value
object |
An object from which to get or set |
value |
A possible value for the |
Missing values (NA
) or empty strings (""
) can be used to specify that a
sample does not belong to any group.
groups() <- value
returns an object of the same sort as x
with the new
group names assigned.
groups()
returns a character
vector giving the group names of x
.
any_assigned()
returns a logical
scalar specifying whether or not
x
has groups.
is_assigned()
returns a logical
vector specifying whether or not an
observation belongs to a group.
N. Frerebeau
Other mutators:
mutators
,
totals()
## Data from Aitchison 1986
data("slides")
head(slides)
## Coerce to compositional data
coda <- as_composition(slides, groups = 2)
groups(coda)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.