# Example: Estimating DB using stem diameter at breast height (DBH) = 30 cm
d <- 30 # Stem Diameter at Breast Height in cm
DB_result <- DB(d)
print(DB_result)
# Example: Handling missing value
d <- NA # Stem Diameter at Breast Height in cm
DB_result <- DB(d)
print(DB_result) # Should return NA because DBH is NA
Run the code above in your browser using DataLab