I am attempting to replicate some of my experience from SAS in R and assume
there are best methods for using a combination of summary(), subset, and
which() to produce a subset of mean values by categorical or ordinal
factors.

within sas I would write

proc means mean data=dataset;
class factor1 factor2
var variable1 variable2;
RUN;

producing an output with means for each variable by factor groupings as
below:

*factor1        factor2          obs       variable    mean*
Level A        treatmentA        3        variable1    10
                                          variable2    22

               treatmentB        3        variable1    12
                                          variable2    30

Level B        treatmentA        3        variable1    10
                                          variable2    22

               treatmentB        3        variable1    12
                                          variable2    30

What is the best way to go about this in R?






-- 
Patrick Schmitz
Graduate Student
Plant Biology
1206 West Gregory Drive
RM 1500

	[[alternative HTML version deleted]]


