getGrpVar: Get Grouping Variable

Description Usage Arguments Value Examples

View source: R/glmmTMB.R

Description

Extract grouping variables for random effect terms from a factor list

Usage

1

Arguments

x

"flist" object; a data frame of factors including an assign attribute matching columns to random effect terms

Value

character vector of grouping variables

Examples

1
2
3
4
5
data(cbpp,package="lme4")
cbpp$obs <- factor(seq(nrow(cbpp)))
rt <- lme4::glFormula(cbind(size,incidence-size)~(1|herd)+(1|obs),
  data=cbpp,family=binomial)$reTrms
getGrpVar(rt$flist)

Example output

[1] "obs"  "herd"

glmmTMB documentation built on July 20, 2021, 9:06 a.m.