R/rowVars.R

`rowVars` <-
function (x,na.rm = TRUE) 
{
    sqr = function(x) x * x
    n = rowSums(!is.na(x))
    n[n <= 1] = NA
    return(rowSums(sqr(x - rowMeans(x,na.rm = na.rm)), na.rm = na.rm)/(n - 1))
}

Try the metaMA package in your browser

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

metaMA documentation built on April 12, 2022, 5:07 p.m.