R/margI.R

Defines functions margI

Documented in margI

margI <-
function(m){
    
    n <- dim(m)
    dimnames(m) <- NULL
    if(length(n) == 3) {
        n2 <- n[2] * n[3]
        dim(m) <- c(n[1], n2)
        mm <- apply(m, 1, sum)
        dim(m) <- n
        mm
    } else {
        cat(" Wrong dimension m")
        return(0)
    }
}

Try the CA3variants package in your browser

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

CA3variants documentation built on Aug. 1, 2019, 5:06 p.m.