Snippets has posted 5883 posts at DZone. View Full User Profile
Or the long way:
> I <- matrix(0,nrow=n,ncol=n)
> I[row(I)==col(I)] <- 1
DZone's 170th Refcard is an essential reference to Camel, an open-source, lightweight, integration library. This Refcard is authored by...