# Create variables
D <- 10:99
WD <- runif(length(D), min = 0.1, max = 1)
H <- D^(2 / 3)
# If you have height data
AGB <- computeAGB(D, WD, H)
# If you do not have height data and a single site
lat <- 4.08
long <- -52.68
coord <- c(long, lat)
# \donttest{
AGB <- computeAGB(D, WD, coord = coord)
# }
# If you do not have height data and several sites (here three)
lat <- c(rep(4.08, 30), rep(3.98, 30), rep(4.12, 30))
long <- c(rep(-52.68, 30), rep(-53.12, 30), rep(-53.29, 30))
coord <- cbind(long, lat)
# \donttest{
AGB <- computeAGB(D, WD, coord = coord)
# }
Run the code above in your browser using DataLab