i am new in R and i have the following problem: I am working with a data.frame of morethan 3000 obs an 6 variables.
     [PLOT] [SPP]   [tree] [BA] [...] []
[1]     2     A       1       3
[2]     2     B       2       2
[3]     2     C       3       5
[4]     3     A       1       4
[5]     3     C       2       7
[6]     4     B       1       4
[7]     4     D       2       5
[PLOT]and [SPP] are factor, [BA] is numeric I am using:
data1 <- ddply(data,c('PLOT','SPP'),summarise,BAtotal = sum(BA,na.rm=TRUE))
But i want another col with this: %BA per SP and per plot. How it is possible to do? is possible to do with sapply??
Thanks
 
    