tree <- data.frame(spp = c(1, 1), D1 = c(30, 25), H = c(25, 25))
getBiomass(tree)
tree <- data.frame(BDATCode = c(1, 1), dbh = c(30, 25), h = c(25, 25))
getBiomass(tree, mapping = c("BDATCode" = "spp", "dbh" = "D1", "h" = "H"))
tree <- data.frame(BDATCode = c(1, 1), dbh = c(30, 25), h = c(25, 25))
getBiomass(tree = tree, mapping = c("BDATCode" = "spp", "dbh" = "D1", "h" = "H"))
## this is standard usage of the fortran code
## now changing the taper form via second diameter D2
tree <- data.frame(spp = 1, D1 = 30, D2 = c(26, 24), H = 25)
getBiomass(tree)
## the following usage of D2 and H2 w.r.t. the biomass functions are new
## and unique to R
## now changing the taper form via quantile of second diameter in H2
tree <- data.frame(spp = 1, D1 = 30, H2 = c(25, 50, 75), H = 25)
getBiomass(tree)
## now changing the taper form via form quotient (i.e. negative D2)
fq <- getForm(list(spp = 1, D1 = 30, H = 25), inv = 1:4)
tree <- data.frame(spp = 1, D1 = 30, D2 = -fq, H = 25)
getBiomass(tree) # biomass of an average tree according to different inventories
Run the code above in your browser using DataLab