Re: [R] rarefy a matrix of counts

2006-10-13 Thread Brian Frappier
) : cannot take a sample larger than the population when 'replace = FALSE' -Alex On 11 Oct 2006, at 15:10, Brian Frappier wrote: Hi Petr, Thanks for your response. I have data that looks like the following: sample 1 sample 2 sample 3 red

Re: [R] Fwd: rarefy a matrix of counts

2006-10-12 Thread Brian Frappier
/06, Petr Pikal [EMAIL PROTECTED] wrote: Hi On 11 Oct 2006 at 12:54, Tony Plate wrote: Date sent: Wed, 11 Oct 2006 12:54:44 -0600 From: Tony Plate [EMAIL PROTECTED] To: Brian Frappier [EMAIL PROTECTED] Copies to: Petr Pikal

Re: [R] rarefy a matrix of counts

2006-10-11 Thread Brian Frappier
On 10 Oct 2006 at 17:40, Brian Frappier wrote: Date sent: Tue, 10 Oct 2006 17:40:47 -0400 From: Brian Frappier [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Subject:[R] rarefy a matrix of counts Hi all, I have a matrix

Re: [R] Fwd: rarefy a matrix of counts

2006-10-11 Thread Brian Frappier
80 columns which shall be no problem. HTH Petr On 11 Oct 2006 at 10:11, Brian Frappier wrote: Date sent:Wed, 11 Oct 2006 10:11:33 -0400 From: Brian Frappier [EMAIL PROTECTED] To: Petr Pikal [EMAIL PROTECTED] Subject

Re: [R] Fwd: rarefy a matrix of counts

2006-10-11 Thread Brian Frappier
-11 at 14:25 -0400, Brian Frappier wrote: I tried all of the approaches below. the problem with: x - data.frame(matrix(NA,100,3)) for (i in 2:ncol(DF)) x[,i-1] - sample(rep(DF[,1], DF[,i]),100) if you want result in data frame or x-vector(list, 3) for (i in 2:ncol(DF)) x[[,i

[R] rarefy a matrix of counts

2006-10-10 Thread Brian Frappier
Hi all, I have a matrix of counts for objects (rows) by samples (columns). I aimed for about 500 counts in each sample (I have about 80 samples) and would now like to rarefy these down to 100 counts in each sample using simple random sampling without replacement. I plan on rarefying several