If your data frame is called myDF, max(myDF[myDF[, condition] == "GPR119a", "responce"])
---- Original message ---- >Date: 01 Feb 2011 19:05:46 +0000 >From: r-help-boun...@r-project.org (on behalf of "A. Ramzan" <ar...@cam.ac.uk>) >Subject: [R] (no subject) >To: r-help@r-project.org > >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: > >responce,mouce,condition >0.105902,KO,con >0.232018561,KO,con >0.335008375,KO,con >0.387025433,KO,GPR119a >0.576769897,KO,GPR119a >0.645120419,KO,GPR119a >0.2538608,KO,GPR119b >0.183061952,KO,GPR119b >0.824035587,KO,GPR119b >0.399201597,KO,GPR119c >0.417006618,KO,GPR119c >0.572958834,KO,GPR119c >0.229467444,KO,GPR119d >0.294089745,KO,GPR119d >0.309964445,KO,GPR119d >0.30474325,KO,GPR119e >0.159374839,KO,GPR119e >0.467726848,KO,GPR119e >1.01841912,KO,GPR119f >0.423028621,KO,GPR119f >0.223588597,KO,GPR119f > >Thank > >______________________________________________ >R-help@r-project.org mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code. -------------------------------------- Dario Strbenac Research Assistant Cancer Epigenetics Garvan Institute of Medical Research Darlinghurst NSW 2010 Australia ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.