For matrices where each row is an observation and each column a variable, cov( x) is the covariance matrix. diag(cov(x)) is a vector of variances for each column, ...
nf.nci.org.au