[R] randomisation

2005-02-09 Thread Yann Clough
Dear useRs I am looking for a way to randomise the values within a matrix: the conditions are that the sums of the rows and the sums of the columns should remain the same as in the original matrix. Any help would be appreciated Cheers Yann __

Re: [R] randomisation

2005-02-09 Thread Peter Dalgaard
Yann Clough [EMAIL PROTECTED] writes: Dear useRs I am looking for a way to randomise the values within a matrix: the conditions are that the sums of the rows and the sums of the columns should remain the same as in the original matrix. Any help would be appreciated Er, explain

RE: [R] randomisation

2005-02-09 Thread John Fox
To: r-help@stat.math.ethz.ch Subject: [R] randomisation Dear useRs I am looking for a way to randomise the values within a matrix: the conditions are that the sums of the rows and the sums of the columns should remain the same as in the original matrix. Any help would be appreciated

Re: [R] randomisation

2005-02-09 Thread Yann Clough
I am working on an ecological problem and dealing with a matrix where rows correspond to samples, and columns correspond to species. The values in the matrix are recorded abundances of the organisms. I want to create a series of randomised datasets where total

RE: [R] randomisation

2005-02-09 Thread Peter Rabinovitch
] [mailto:[EMAIL PROTECTED] On Behalf Of Yann Clough Sent: Wednesday, February 09, 2005 8:28 AM To: Peter Dalgaard; r-help@stat.math.ethz.ch Subject: Re: [R] randomisation I am working on an ecological problem and dealing with a matrix where rows correspond to samples, and columns

Re: [R] randomisation

2005-02-09 Thread Jari Oksanen
On Wed, 2005-02-09 at 14:27 +0100, Yann Clough wrote: I am working on an ecological problem and dealing with a matrix where rows correspond to samples, and columns correspond to species. The values in the matrix are recorded abundances of the organisms. I want to create a

Re: [R] randomisation

2005-02-09 Thread Gabor Grothendieck
Yann Clough y.clough at NS1.uaoe.gwdg.de writes: : : Dear useRs : : I am looking for a way to randomise the values within a matrix: : the conditions are that the sums of the rows and the sums of the columns should : remain the same as in the original matrix. : ?r2dtable

Re: [R] randomisation

2005-02-09 Thread francoisromain
Selon Yann Clough [EMAIL PROTECTED]: Dear useRs I am looking for a way to randomise the values within a matrix: the conditions are that the sums of the rows and the sums of the columns should remain the same as in the original matrix. Any help would be appreciated Cheers Yann

Re: [R] randomisation

2005-02-09 Thread Yann Clough
Thanks to Gabor, Francois, Peter D., Jari, Peter R.and John r2dtable is what I was looking for, it implements the Patefield algorithm. Patefield, W. M. (1981) Algorithm AS159. An efficient method of generating r x c tables with given row and column totals. Applied Statistics 30, 91 97. This