Array of two or more dimensions, containing numeric, complex, integer or logical values, or a numeric data frame.
na.rm
Logical. Should missing values (including NaN) be omitted from the calculations?
Details
This function is the same as applying apply with FUN=var but is a lot faster.
Value
A numeric or complex array of suitable size, or a vector if the result is one-dimensional. The dimnames (or names for a vector result) are taken from the original array.
Examples
## The function is currently defined as
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))
}