Here you will find daily news and tutorials about R, contributed by over 450 bloggers.
You can subscribe for e-mail updates:
And get updates to your Facebook:
If you are an R blogger yourself you are invited to add your own R content feed to this site (Non-English R bloggers should add themselves- here)
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)
[,...