R/checkgroup.R

Defines functions checkgroup

###
### R routines for the R package dlnm (c)
#
checkgroup <- 
function(group, x, basisvar, lag) {
#
################################################################################
#
  if(NCOL(x)>1L) stop("'group' allowed only for time series data")
  if(min(tapply(x, group, length)) <= diff(lag))
    stop("each group must have length > diff(lag)")
}

Try the dlnm package in your browser

Any scripts or data that you put into this service are public.

dlnm documentation built on Oct. 7, 2021, 5:09 p.m.