Variance of a vector {Rfast}R Documentation

Variance (and standard deviation) of a vector

Description

Variance (and standard deviation) of a vector.

Usage

Var(x, std = FALSE,na.rm = FALSE)

Arguments

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.

Details

This is a faster calculation of the usual variance of a matrix.

Value

The variance of the vector.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr> and Manos Papadakis <papadakm95@gmail.com>.

See Also

colVars, cova

Examples

x <- rnorm(100)
a1 <- Var(x)
a2 <- var(x)
x<-NULL

[Package Rfast version 2.1.0 Index]