?by
FUN: a function to be applied to data frame subsets of 'data'.
...: further arguments to 'FUN'.
by (SS, year, sum)
/E
Emilie Berthiaume wrote:
>Hi,
>
>I'm just getting started with R and I'm having problems with some
simple
>operations: I want to get the the sum of the column "SStot" for
each year using
>the function by. The data set is named "SS". I've tried
this:
>
>by (SS, year, sum(SStot))
>
>and it's not working. Is it because there's a different number of
rows for each
>year? How else can I do this?
>
>--
>Emilie Berthiaume
>Graduate student
>Biology Departement
>Universit?? de Sherbrooke
>2500 boul. de l'Universit??
>Sherbrooke, Qu??bec
>J1K 2R1 CANADA
>
>T??l: 1-819-821-8000 poste 2059
>Fax: 1-819-821-8049
>Emilie.Berthiaume at USherbrooke.ca
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
>
>
>
--
Dipl. bio-chem. Witold Eryk Wolski
MPI-Moleculare Genetic
Ihnestrasse 63-73 14195 Berlin _
tel: 0049-30-83875219 'v'
http://www.molgen.mpg.de/~wolski / \
mail: witek96 at users.sourceforge.net ---W-W----
wolski at molgen.mpg.de