set.seed(14)
nz <- 8
ln <- nz
smat <- spam(0,ln,ln)
tt <- cbind(sample(ln,nz),sample(ln,nz))
print(tt)
smat[tt] <- 1:nz
par(mfcol=c(1,2),pty='s')spam.options(printsize=1000)
print(smat)spam.options(printsize=10)
print(smat)
summary(smat)
Run the code above in your browser using DataLab