Skip to content

means, SD's and tapply

5 messages · Christopher R. Dolanc, Scott Chamberlain, David Winsemius +2 more

#
On Feb 25, 2011, at 3:09 PM, Christopher R. Dolanc wrote:

            
Some functions let you put an arbitrary number of items after the  
first (aggregate() always confuses me because it _does_ this)  but  
tapply expects them to be in a list or vector, so try:

with( stems353, tapply(Stems, list(Species, SizeClass, Time) , mean) )

with() improves readability
The third item in your arguments got matched to what tapply was  
expecting to be a function name.
David Winsemius, MD
West Hartford, CT