Description Usage Arguments Details Value Author(s) References See Also Examples
Form row and column variances for numeric arrays.
1 2 3 4 |
x |
an 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? |
dims |
integer: Which dimensions are regarded as ?rows? or ?columns? to sum over. For row*, the sum or mean is over dimensions dims+1, ...; for col* it is over dimensions 1:dims. |
unbiased |
logical. Should the estimator of the variance be unbiaised, using '(N - 1)' as a denominator? |
SumSquares |
logical. Should the function return only the sum of squares? |
twopass |
logical. 'twopass = TRUE' is needed for numerical accuracy if mu >> sigma. |
These functions are equivalent to use of apply with 'FUN = var' with appropriate margins, but are a lot faster.
A numeric or complex array of suitable size, or a vector if the result is one-dimensional. For the first four functions the dimnames (or 'names' for a vector result) are taken from the original array.
Antoine Filipovic Pierucci
From David Brahm on R-Help, inspired from Package "colSums".
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.