dbh
units based on minimum and maximum values of dbh
.R/guess_dbh_unit.R
guess_dbh_unit.Rd
Guess dbh
units based on minimum and maximum values of dbh
.
guess_dbh_unit(x)
x | A numeric vector. |
---|
A length-1 character string.
# Case when # min(x, na.rm = TRUE) < 1.1 && # max(x, na.rm = TRUE) < 500 guess_dbh_unit(c(1.0, 100))#> [1] "cm" #> attr(,"class") #> [1] "guessed" "character"#> Error : Can't guess dbh units.#> Error : Can't guess dbh units.#> Error : Can't guess dbh units.# Case when # min(x, na.rm = TRUE) > 9 && # max(x, na.rm = TRUE) > 500 guess_dbh_unit(c(9.1, 500.1))#> [1] "mm" #> attr(,"class") #> [1] "guessed" "character"#> Error : Can't guess dbh units.#> Error : Can't guess dbh units.#> Error : Can't guess dbh units.