R/divlocus.R

"divlocus" <-
function(dat){
   n <- nrow(dat)
   hp.div <- apply(dat, 2, function(x) ( 2 * ( n * sum(x^2) - sum(x)^2 ) ) )
   return(hp.div)
}

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.