obj <- tprTrees(spp=c(1, 15),
Dm=list(c(30, 28), c(30, 28)),
Hm=list(c(1, 3), c(1, 3)),
Ht = rep(30, 2))
## OBS: component 'ndl' NOT included to aboveground biomass 'agb'
(tmp <- tprBiomass(obj, component="all"))
rowSums(tmp[, -which(colnames(tmp) %in% c("agb", "ndl"))])
## equal to
tmp$agb
tprBiomass(obj, component=NULL) # aboveground biomass
component <- c("agb", "sw", "sb", "ndl")
tprBiomass(obj, component=component)
component <- c("sw", "sb", "ndl")
tprBiomass(obj, component=component)
Run the code above in your browser using DataLab