R/sirt_permutations.R

Defines functions sirt_permutations

Documented in sirt_permutations

## File Name: sirt_permutations.R
## File Version: 0.02


sirt_permutations <- function(r,v)
{
    NL <- length(v)
    NC <- NL^r
    mat <- matrix(0, nrow=NC, ncol=r)
    hh <- 1
    for (dd in seq(r,1,by=-1)){
        m1 <- rep(v, each=NL^(hh-1) )
        m1 <- rep(m1, NC/length(m1) )
        mat[,dd] <- m1
        hh <- hh + 1
    }
    return(mat)
}

Try the sirt package in your browser

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

sirt documentation built on May 29, 2024, 8:43 a.m.