I have a data frame with two columns, one of which is a factor  
(Species) and the other is numeric (BA, which stands for basal  
area).  Here's a sample:


Species BA
ACSA    55.7632696
FRAM    122.9933524
ACSA    67.54424205
ACSA    89.22123136
ACSA    82.46680716
ACSA    22.46238747
ACSA    19.94911335
ACSA    20.42035225
ACSA    19.00663555
ACSA    21.67698931
ACSA    57.80530483
ACSA    30.31636911
Dead    43.98229715
Dead    40.21238597
Dead    16.49336143
Dead    40.21238597
Dead    16.49336143
ACSA    78.53981634
VIPR    3.926990817
AEGL    11.78097245
AEGL    0
AEGL    0
ACSA    0
ACSA    0
ACSA    0
VIPR    0

I would like to calculate relative basal area for each species in  
this plot.  For that, I need to divide the total basal area per  
species by the total basal area in the plot.  Getting the total basal  
area in the plot is easy.  However, I'm mystified on how to get the  
total basal area per species.  Is there a way to extract and/or sum  
the total basal area per species?

Thank you in advance.

Jim Milks

Graduate Student
Environmental Sciences Ph.D. Program
Wright State University
3640 Colonel Glenn Hwy
Dayton, OH 45435

        [[alternative HTML version deleted]]

______________________________________________
R-help@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
and provide commented, minimal, self-contained, reproducible code.

Reply via email to