Re: [R] Finding the maximum in a particular group in a dataframe

2011-02-02 Thread Dennis Murphy
Hi: Using df as your data frame, max(subset(df, condition == 'GPR119a', select = responce)) [1] 0.6451204 You asked this question yesterday with several correct responses. What was wrong with them? Dennis On Wed, Feb 2, 2011 at 12:48 AM, Asan Ramzan wrote: > Hello > > I am trying to find a w

Re: [R] Finding the maximum in a particular group in a dataframe

2011-02-02 Thread David Winsemius
On Feb 2, 2011, at 3:48 AM, Asan Ramzan wrote: Hello I am trying to find a way to find the max value, for only a subset of a dataframe, depending on how the data is grouped for example, How would I find the maxmium responce, for all the GPR119a condition below: I've tried tapply tapp

[R] Finding the maximum in a particular group in a dataframe

2011-02-02 Thread Asan Ramzan
Hello I am trying to find a way to find the max value, for only a subset of a dataframe, depending on how the data is grouped for example, How would I find the maxmium responce, for all the GPR119a condition below: I've tried tapply > tapply(GPR119data$responce, GPR119data$GPR119a, max) Error i