ropensci / allodb

An R package for biomass estimation at extratropical forest plots.
https://docs.ropensci.org/allodb/
GNU General Public License v3.0
36 stars 11 forks source link

Confirm that dbh_min/max are inclusive #83

Closed maurolepore closed 5 years ago

maurolepore commented 5 years ago

(Moving from https://github.com/forestgeo/fgeo.biomass/issues/27#issuecomment-474897852 to make sure I don't forget to ask this.)

@teixeirak

I'm assuming that the limits imposed by dbh_min/max are inclusive (see example below). Is my assumption correct?

# Inclusive limits
fgeo.biomass:::is_in_range(1, 1, 10)
#> [1] TRUE
fgeo.biomass:::is_in_range(10, 1, 10)
#> [1] TRUE

# Out of bounds
fgeo.biomass:::is_in_range(11, 1, 10)
#> [1] FALSE
fgeo.biomass:::is_in_range(0, 1, 10)
#> [1] FALSE

# Well within the limit
fgeo.biomass:::is_in_range(5, 1, 10)
#> [1] TRUE

Created on 2019-03-20 by the reprex package (v0.2.1)

teixeirak commented 5 years ago

Correct.