Re: [R-sig-eco] Randomizing matrices

2012-08-19 Thread Peter Solymos
-ecology@r-project.org > Sent: Saturday, August 18, 2012 10:50:46 AM > Subject: Re: [R-sig-eco] Randomizing matrices > > Allan, > > Simply defining the dimension might work: > dim(v) <- dim(trial2) > but it is not clear what you are trying to achieve with the rep(...

Re: [R-sig-eco] Randomizing matrices

2012-08-18 Thread Allan Edelsparre
Thanks Peter, I think that might actually work. I Will let you know. Allan - Original Message - From: "Peter Solymos" To: "Allan Edelsparre" Cc: r-sig-ecology@r-project.org Sent: Saturday, August 18, 2012 10:50:46 AM Subject: Re: [R-sig-eco] Randomizing matr

Re: [R-sig-eco] Randomizing matrices

2012-08-18 Thread Peter Solymos
Allan, Simply defining the dimension might work: dim(v) <- dim(trial2) but it is not clear what you are trying to achieve with the rep(..., 1000) part. It won't permute the matrix 1000 times but repeat same values. You might want to have a look at oecosimu in vegan which calculates the distributio

[R-sig-eco] Randomizing matrices

2012-08-18 Thread Allan Edelsparre
Dear R ecologists, I'm trying to figure out a way to calculate the sum of squared distances (SSD) between two matrices, where one matrix is held constant and the other is randomized. So far I have been able to get the syntax together to obtain my observed SSD, but the problem for me is obtain SSD