R/KR-across-versions.R

Defines functions .get.RT.dim.by.RT

## #######################################################################################
##
## Functionality required to make pbkrtest work both on CRAN and devel versions of lme4
##
## Banff, August 2013, Søren Højsgaard
##
## #######################################################################################

.get.RT.dim.by.RT <- function(object) {
  ## output: dimension (no of columns) of covariance matrix for random term ii
  ##  .cc <- class(object)
  qq <-
      ##if (.cc %in% "mer") {
      if (inherits(object, "mer")){
          sapply(object@ST,function(X) nrow(X)) 
      } else {
          sapply(object@cnms, length)  ## FIXME: use getME()
      }
    qq
}
hojsgaard/pbkrtest documentation built on Feb. 4, 2023, 7:32 a.m.