R/getRow.R

getRow <- function(noflevels, row.no, zerobased = FALSE) {
    
    if (!zerobased) {row.no <- row.no - 1}
    
    mbase <- c(rev(cumprod(rev(noflevels))), 1)[-1]
    
    t(sapply(row.no, function(x) x %/% mbase) %% noflevels)
}
AlrikThiem/QCApro documentation built on May 5, 2019, 4:55 a.m.