R/ikcirt.rndData1.R

Defines functions ikcirt.rndData1

Documented in ikcirt.rndData1

ikcirt.rndData1 <-
function(N, qTypes, mxDelta, ns) {
    
    mxData <- matrix(NA, sum(ns), N)
    for(i in 1:N) {
        aa <- NULL
        for(j in 1:length(ns)) {
            if(qTypes[j] == "R") {
                this.rank <- sample(I(1:ns[j]))
            }
            if(qTypes[j] == "M") {
                this.rank <- sample( c(1, ns[j], rep(NA, ns[j]-2)) )
            }
            
            aa <- c( aa, this.rank )
        }
        mxData[ , i] <- aa
    }
    mxData
    
    
    return(mxData)
}

Try the kcirt package in your browser

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

kcirt documentation built on May 2, 2019, 4:16 a.m.