isNested: Is f1 nested within f2?

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

Does every level of f1 occur in conjunction with exactly one level of f2? The function is based on converting a triplet sparse matrix to a compressed column-oriented form in which the nesting can be quickly evaluated.

Usage

1
  isNested(f1, f2)

Arguments

f1

factor 1

f2

factor 2

Value

TRUE if factor 1 is nested within factor 2

Examples

1
2
with(Pastes, isNested(cask, batch))   ## => FALSE
with(Pastes, isNested(sample, batch))  ## => TRUE

lme4 documentation built on May 29, 2017, 8:40 p.m.

Search within the lme4 package
Search all R packages, documentation and source code