Re: [R] Aggregate() questions

2008-05-02 Thread Henrique Dallazuanna
You need seet the FUN argument: X - with( FDP0D, ave( IAC, list( Key), FUN = mean)) On 5/1/08, Chip Barnaby [EMAIL PROTECTED] wrote: Henrique, thanks for the response. As a new user, I was unaware of with() and ave(), those are both very helpful. However, I don't think your method is quite

Re: [R] Aggregate() questions

2008-05-01 Thread Chip Barnaby
Henrique, thanks for the response. As a new user, I was unaware of with() and ave(), those are both very helpful. However, I don't think your method is quite right. I for all rows in each Key, I want the mean( IAC) where ProfA = 0. To simplify the problem, I have made a subset dataframe

Re: [R] Aggregate() questions

2008-04-30 Thread Henrique Dallazuanna
If I understand your question: x$IAC0 - with(x, ave(IAC, list(ProfA, Key), FUN = mean)) On Wed, Apr 30, 2008 at 3:52 PM, Chip Barnaby [EMAIL PROTECTED] wrote: Dear all -- I have a data frame containing data related to heat gain through windows. The general form is ... Key ProfAIAC