Re: [R] Aggregrate function

2009-02-13 Thread Monica Pisica
Date: Thu, 12 Feb 2009 14:05:44 -0800 From: spec...@stat.berkeley.edu To: pisican...@hotmail.com CC: christos.hat...@nuverabio.com; r-help@r-project.org; markle...@verizon.net Subject: Re: [R] Aggregrate function Monica - Here's a more compact version of the same idea: do.call(rbind

[R] Aggregrate function

2009-02-12 Thread Monica Pisica
Hi, I have to recognize that i don't fully understand the aggregate function, but i think it should help me with what i want to do. xveg is a data.frame with location, species, and total for the species. Each location is repeated, once for every species present at that location. For each

Re: [R] Aggregrate function

2009-02-12 Thread Jorge Ivan Velez
Dear Monica, Try this xveg[with(xveg, tot %in% tapply(tot,loc,max)),] HTH, Jorge On Thu, Feb 12, 2009 at 1:58 PM, Monica Pisica pisican...@hotmail.comwrote: Hi, I have to recognize that i don't fully understand the aggregate function, but i think it should help me with what i want to

Re: [R] Aggregrate function

2009-02-12 Thread Christos Hatzis
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Monica Pisica Sent: Thursday, February 12, 2009 1:58 PM To: R help project Subject: [R] Aggregrate function Hi, I have to recognize that i don't fully understand the aggregate

Re: [R] Aggregrate function

2009-02-12 Thread Monica Pisica
$sp[maxindices],collapse=,),tot=max(.df$tot)) }) result - do.call(rbind,temp) print(result) Thanks so much again, Monica From: christos.hat...@nuverabio.com To: pisican...@hotmail.com; r-help@r-project.org Subject: RE: [R] Aggregrate function Date: Thu, 12 Feb 2009 15:56:38 -0500 I

Re: [R] Aggregrate function

2009-02-12 Thread Christos Hatzis
-Original Message- From: Monica Pisica [mailto:pisican...@hotmail.com] Sent: Thursday, February 12, 2009 4:35 PM To: christos.hat...@nuverabio.com; R help project; markle...@verizon.net Subject: RE: [R] Aggregrate function Hi, Thanks for the solution. Mark Leeds sent me privately

Re: [R] Aggregrate function

2009-02-12 Thread Phil Spector
, Monica From: christos.hat...@nuverabio.com To: pisican...@hotmail.com; r-help@r-project.org Subject: RE: [R] Aggregrate function Date: Thu, 12 Feb 2009 15:56:38 -0500 I don't have an easy solution with aggregate, because the function in aggregate needs to return a scalar. But the following

Re: [R] Aggregrate function

2009-02-12 Thread David Winsemius
: Thursday, February 12, 2009 1:58 PM To: R help project Subject: [R] Aggregrate function Hi, I have to recognize that i don't fully understand the aggregate function, but i think it should help me with what i want to do. xveg is a data.frame with location, species, and total

Re: [R] Aggregrate function

2009-02-12 Thread markleeds
 b  68 -Christos -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Monica Pisica Sent: Thursday, February 12, 2009 1:58 PM To: R help project Subject: [R] Aggregrate function Hi, I have to recognize that i don't fully

Re: [R] Aggregrate function

2009-02-12 Thread David Winsemius
: Thursday, February 12, 2009 1:58 PM To: R help project Subject: [R] Aggregrate function Hi, I have to recognize that i don't fully understand the aggregate function, but i think it should help me with what i want to do. xveg is a data.frame with location, species, and total

Re: [R] Aggregrate function

2009-02-12 Thread David Winsemius
-help-boun...@r-project.org] On Behalf Of Monica Pisica Sent: Thursday, February 12, 2009 1:58 PM To: R help project Subject: [R] Aggregrate function Hi, I have to recognize that i don't fully understand the aggregate function, but i think it should help me with what i want to do. xveg