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
__
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
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
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
]
[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
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
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
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
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