mean(x[x[,'region'] == 'south', 'profit'])
or if dataframe
mean(x$profit[x$region == 'south'])
or for all regions
tapply(x$profit, x$region, mean)
On Fri, Jul 3, 2009 at 6:55 PM, JoK LoQ<
jokloq@...> wrote:
--
Jim Holtman
Cincinnati, OH
+1 513 646 9390
What is the problem that you are trying to solve?
______________________________________________
R-help@... mailing list
https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide
http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.