Variance of a vector | R Documentation |
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@uoc.gr> and Manos Papadakis <papadakm95@gmail.com>.
colVars, cova
x <- rnorm(100)
a1 <- Var(x)
a2 <- var(x)
x<-NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.