R/CA.R

Defines functions `CA`

`CA` <-
    function(Y)
{
    Y <- Y/sum(Y)
    r <- rowSums(Y)
    c <- colSums(Y)
    Ybar <- (Y - r %o% c)/sqrt(r %o% c)
    SOL <- svd(Ybar)
    SOL$u <- diag(1/sqrt(r)) %*% SOL$u
    SOL$v <- diag(1/sqrt(c)) %*% SOL$v
    SOL
}

Try the barebone package in your browser

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

barebone documentation built on May 2, 2019, 5:17 p.m.