R/sumsqscale.R

"sumsqscale" <-
function(mat){
   s <- sign(mat)
   sq <- mat^2
   ssq <- apply(sq, 2, sum)
   for (i in 1:ncol(mat)) sq[,i] <- sq[,i] / ssq[i]
   return (s*sqrt(sq))
}

Try the hapsim package in your browser

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

hapsim documentation built on May 1, 2019, 9:11 p.m.