# Starting with non-spam objects, we get a spam matrix
kronecker.spam( diag(2), array(1:4,c(2,2)))
kronecker( diag.spam(2), array(1:4,c(2,2)))
# Notice the preservation of sparsity structure:
kronecker( diag.spam(2), array(1:4,c(2,2)),FUN="+")
Run the code above in your browser using DataLab