Hello there,

I am having trouble to understand the var-command and hoping for your help.

I read in the documentation that, applied to a matrix given two matrices (x and y), it calculates the covariances between the columns of `x`

and the columns of `y`

.

But what does R do when I apply it to one matrix only? (See code below)?

m<-matrix(1:12, nrow=4, byrow = FALSE)

var(m)

RESULT:

var(m)

[,1] [,2]

[1,] 1.666667 1.666667

[2,] 1.666667 1.666667

[3,] 1.666667 1.666667

[,3]

[1,] 1.666667

[2,] 1.666667

[3,] 1.666667