Variance (and standard deviation) of a vector
Variance (and standard deviation) of a vector.
Var(x, std = FALSE,na.rm = FALSE)
x |
A vector with data. |
std |
If you want the standard deviation set this to TRUE, otherwise leave it FALSE. |
na.rm |
TRUE or FAlSE for remove NAs if exists. |
This is a faster calculation of the usual variance of a matrix.
The variance of the vector.
Michail Tsagris
R implementation and documentation: Michail Tsagris <mtsagris@yahoo.gr> and Manos Papadakis <papadakm95@gmail.com>.
x <- rnorm(100) a1 <- Var(x) a2 <- var(x) x<-NULL
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.