# Passes validation
spec_ids <- as.character(c(3, 3, 3, 1, 1, 1, 1, 2, 2, 8))
spec_ids <- new_fe_species_bavrn_state_short(spec_ids)
validate_fe_species_bavrn_state_short(spec_ids)
# Validating the following spec_ids throws an error due to
# non-supported species codes
spec_ids <- as.character(c(3, 3, 8712, 1, 1, 1, 349, 2, 2, 8))
spec_ids <- new_fe_species_bavrn_state_short(spec_ids)
try(
validate_fe_species_bavrn_state_short(spec_ids)
)
Run the code above in your browser using DataLab