Learn R Programming

lme4 (version 1.1-7)

ngrps: Number of levels

Description

Number of levels of one or more grouping factor.

Usage

ngrps(object, ...)

Arguments

object
An R object.
...
Currently ignored.

Value

  • Number(s) of levels

Details

Currently there are methods for merMod and factor objects.

Examples

Run this code
ngrps(factor(seq(1,10,2)))
ngrps(lmer(Reaction ~ 1|Subject, sleepstudy))

Run the code above in your browser using DataLab