varLevel: Identify level of aggregation at which a variable in...

Description Usage Arguments Value

View source: R/new_up.R

Description

Shows levels of each variable with respect to grouping formula of form ~id or nested ids ~id1/id2

Usage

1
varLevel(x, form, ...)

Arguments

x

data frame

form

formula (evaluated in 'x') to identify clusters

...

extra arguments to constant function

Value

Level 0 is a constant for the whole data frame, Level <= 1 implies the variable is constant within levels of id1, Level <= 2 implies the variable is constant within levels of id2, ... etc.

NOTE: NA counts as a distinct value


john-d-fox/gspline documentation built on Sept. 17, 2020, 3:19 a.m.