Skip to content
Prev 25801 / 398502 Next

Rbind help needed

On Wed, 27 Nov 2002 Bayesianbay at aol.com wrote:

            
Is z a matrix too?  A more efficient way would be

dn <- dim(z)
new <- t(matrix(t(z), dn[2], dn[1]*n))

relying on recycling.  As the t's show, it works most naturally for cbind.