Re: [R] random sampling with some limitive conditions?

2007-07-09 Thread Gavin Simpson
,cc)[order(runif(n))] > > > > If you want many such sets of random assignments to be generated at once > > you can use a few more rep() calls in the expressions to generate multiple > > sets in the same way. (Do you actually want the assignments or just the > > tables?)

Re: [R] random sampling with some limitive conditions?

2007-07-08 Thread Zhang Jian
t fully specified the distribution you want. > > Alan Zaslavsky > Harvard U > > > From: "Zhang Jian" <[EMAIL PROTECTED]> > > Subject: [R] random sampling with some limitive conditions? > > To: r-help > > > > I want to gain tho

[R] random sampling with some limitive conditions?

2007-07-08 Thread Alan Zaslavsky
ang Jian" <[EMAIL PROTECTED]> > Subject: [R] random sampling with some limitive conditions? > To: r-help > > I want to gain thousands of random sampling data by randomizing the > presence-absence data. Meantime, one important limition is that the row and > column sums

Re: [R] random sampling with some limitive conditions?

2007-07-08 Thread Zhang Jian
-Original Message- > > > From: [EMAIL PROTECTED] [mailto: > > [EMAIL PROTECTED] > > > On Behalf Of Zhang Jian > > > Sent: Saturday, July 07, 2007 12:31 PM > > > To: r-help > > > Subject: [R] random sampling with some limitive conditions? >

Re: [R] random sampling with some limitive conditions?

2007-07-08 Thread Zhang Jian
ndom sampling method. On 7/7/07, Daniel Nordlund <[EMAIL PROTECTED]> wrote: > > > -Original Message- > > From: [EMAIL PROTECTED] [mailto: > [EMAIL PROTECTED] > > On Behalf Of Zhang Jian > > Sent: Saturday, July 07, 2007 12:31 PM > > To: r-help

Re: [R] random sampling with some limitive conditions?

2007-07-07 Thread Daniel Nordlund
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf Of Zhang Jian > Sent: Saturday, July 07, 2007 12:31 PM > To: r-help > Subject: [R] random sampling with some limitive conditions? > > I want to gain thousands of random sampling

[R] random sampling with some limitive conditions?

2007-07-07 Thread Zhang Jian
I want to gain thousands of random sampling data by randomizing the presence-absence data. Meantime, one important limition is that the row and column sums must be fixed. For example, the data "tst" is following: site1 site2 site3 site4 site5 site6 site7 site8 1 0 0 0 1 1 0 0 0 1 1 1 0 1 0 1 1 0