R/all_patterns.R

`all_patterns` <- function(a,b,nobj=NULL){
################################################################
# corresponds to: rev( expand.grid(a:b,a:b,a:b,...) )
#   like GLIM's $gfac
################################################################

  if (is.null(nobj))
     nobj  <-get("nobj",get("ENV", environment(patt.design)))
  grid<-vector("list",nobj)
  for (i in 1:nobj)
    grid[[i]]<-a:b
  patterns<-rev( expand.grid(grid) )
  patterns
}

Try the prefmod package in your browser

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

prefmod documentation built on May 2, 2019, 4:59 p.m.