is_assigned: Grouped Data

is_assignedR Documentation

Grouped Data

Description

Retrieve the (reference) groups to which the observations belong.

Usage

is_assigned(object)

any_assigned(object)

all_assigned(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 R object.

Value

  • is_assigned() returns a logical vector specifying whether or not an observation belongs to a group.

  • any_assigned() returns an logical scalar specifying if any observation belongs to a group.

  • all_assigned() returns an logical scalar specifying if all observations belong to a group.

Author(s)

N. Frerebeau

See Also

Other grouping methods: group(), group_names(), group_split(), group_subset()

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)

tesselle/nexus documentation built on June 1, 2025, 9:04 p.m.