Kevin Ummel <kevinummel <at> gmail.com> writes:
> I'm looking for a way to 'explode' a matrix like this:
>
> > matrix(1:4,2,2)
> [,1] [,2]
> [1,] 1 3
> [2,] 2 4
>
This is the Kronecker product of your matrix with the
matrix (1 1 ; 1 1)
m <- matrix(1:4,2,2)
kronecker(m,matrix(1,2,2))
cheers
Ben Bolker