PredictiveEcology / LandR

Landscape Ecosystem Modelling in R
https://landr.predictiveecology.org/
GNU General Public License v3.0
17 stars 7 forks source link

use correct data types when creating/updating species trait tables #90

Closed achubaty closed 4 months ago

achubaty commented 1 year ago

Biomass_core asserts that species trait table columns are specific types, yet LandR::getSpeciesTable and LandR::updateSpeciesTable don't check/enforce using the same rules as the assertions in LandR::assertColumns.

In particular, getSpeciesTable simply reads in a csv file using stringsAsFactors = FALSE, with no followup to convert character columns (e.g., postfireregen) to factor.

achubaty commented 1 year ago

NOTE: LandR::prepSpeciesTable is doing coercion