var, cov, and cor compute the variance of x and the covariance or correlation of x and y if these are vectors. If x and y are matrices then the covariances (or correlations) between the columns of x and the columns of y are computed.

These functions mask and wrap the stats::var, stats::cov, and stats::cor functions to add support for vecvec objects. More details can be found in the documentation for those functions.

var(x, ...)

cov(x, ...)

cor(x, ...)

Arguments

x

a numeric vector, matrix or data frame.

...

Additional arguments passed to stats::var, stats::cov, and stats::cor.