Re: [R] How to insert a vector or matrix into an existing matrix

2008-04-21 Thread Gabor Csardi
On Mon, Apr 21, 2008 at 12:50:08PM +, David Winsemius wrote: [...] > > Am I correct in assuming that after the creation of m by way of a > temporary matrix that the temporary matrix would then be available for > garbage collection, whereas if both m and m2 were created, there would > be mor

Re: [R] How to insert a vector or matrix into an existing matrix

2008-04-21 Thread David Winsemius
Gabor Csardi <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > On Sun, Apr 20, 2008 at 08:16:11PM +, David Winsemius wrote: >> Gabor Csardi <[EMAIL PROTECTED]> wrote in >> news:[EMAIL PROTECTED]: >> >> > Hmm, my understanding is different, >> > >> > m <- matrix(sample(10*10), ncol=10)

Re: [R] How to insert a vector or matrix into an existing matrix

2008-04-21 Thread Gabor Csardi
On Sun, Apr 20, 2008 at 08:16:11PM +, David Winsemius wrote: > Gabor Csardi <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > > > Hmm, my understanding is different, > > > > m <- matrix(sample(10*10), ncol=10) > > m2 <- rbind( m[1:5,], 1:10, m[6:10,] ) > > m3 <- cbind( m[,1:8], 1:10,

Re: [R] How to insert a vector or matrix into an existing matrix

2008-04-20 Thread David Winsemius
Gabor Csardi <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Hmm, my understanding is different, > > m <- matrix(sample(10*10), ncol=10) > m2 <- rbind( m[1:5,], 1:10, m[6:10,] ) > m3 <- cbind( m[,1:8], 1:10, m[,9:10] ) I read the question the same way and, in response to the part of the

Re: [R] How to insert a vector or matrix into an existing matrix

2008-04-20 Thread Gabor Csardi
Hmm, my understanding is different, m <- matrix(sample(10*10), ncol=10) m2 <- rbind( m[1:5,], 1:10, m[6:10,] ) m3 <- cbind( m[,1:8], 1:10, m[,9:10] ) G. On Sun, Apr 20, 2008 at 10:21:47AM -0300, Henrique Dallazuanna wrote: > If I understand: > > m <- matrix(sample(10*10), ncol=10) > m[5:6, 8:9]

Re: [R] How to insert a vector or matrix into an existing matrix

2008-04-20 Thread Henrique Dallazuanna
If I understand: m <- matrix(sample(10*10), ncol=10) m[5:6, 8:9] <- 1:4 On 4/18/08, Ng Stanley <[EMAIL PROTECTED]> wrote: > Hi, > > Is there any functions to insert a vector or matrix into an existing matrix > say between row 5 and 6 or column 8 and 9, without creating a temporary > matrix ? >

[R] How to insert a vector or matrix into an existing matrix

2008-04-18 Thread Ng Stanley
Hi, Is there any functions to insert a vector or matrix into an existing matrix say between row 5 and 6 or column 8 and 9, without creating a temporary matrix ? Thanks Stanley [[alternative HTML version deleted]] __ R-help@r-project.org mailin