I googled for this once upon a time and nothing came up. Hopefully this saves someone ten minutes of digging about in the documentation.
You make identity matrices with the keyword diag, and the number of dimensions in parentheses.
> diag(3)
[,...

First, let us recall a standard result from linear algebra: "real symmetric matrices are diagonalizable by orthogonal matrices". Thus, any variance-covariance matrix can be written
since a variance-covariance matrix is also definite positive. In ...