match_species_id.Rd
Parses species codes in input data and matches them with the BETY species ID.
match_species_id(
input_codes,
format_name = "custom",
bety = NULL,
translation_table = NULL,
...
)
data.frame
containing the following columns:
input_code
Character provided as input
bety_species_id
Big integer species ID, unique and specific to BETY
genus
Genus part of Latin name, from BETY
species
Species part of Latin name, from BETY
format_name
can be one of the following:
usda
USDA Plants database symbol (e.g. QURU, TSCA)
fia
FIA species code
latin_name
Scientific name, as "Genus species"; must match exactly and unambiguously to scientificname
field in BETY
custom
A data frame matching BETY IDs (column name bety_species_id
) to input codes (column name input_code
). This data frame must be passed via the translation_table
argument.
if (FALSE) { # \dontrun{
con <- PEcAn.DB::db.open(list(
driver = "Postgres",
dbname = 'bety',
user = 'bety',
password = 'bety',
host = 'localhost')
)
input_codes <- c('ACRU', 'PIMA', 'TSCA')
format_name <- 'usda'
match_species_id(input_codes = input_codes,
format_name = format_name,
bety = con)
} # }