get_datlvls: Determine grouping level of data

View source: R/helpfunctions.R

get_datlvlsR Documentation

Determine grouping level of data

Description

For each column in a data.frame-like object, identify the hierarchical level as the highest grouping level from groups_df for which the column is identical for all members of every group.

Usage

get_datlvls(data, groups_df)

Arguments

data

a data.frame

groups_df

the data.frame of (integer) grouping vectors of length nrow(data).

Value

A named character vector of length ncol(data). Each element is the name of the grouping level at which the corresponding data column is constant.

See Also

get_grouping_levels


JointAI documentation built on Jan. 30, 2026, 5:07 p.m.