
Detect a within-case nesting variable by name pattern then structure
Source:R/utils-formulas.R
find_nest_var.RdDetect a within-case nesting variable by name pattern then structure
Usage
find_nest_var(data, exclude = character(0))Examples
d <- data.frame(
case = rep("Ian", 8),
behavior = rep(c("greet", "share"), 4),
outcome = rnorm(8)
)
find_nest_var(d, exclude = "case")
#> [1] "behavior"