View source: R/fe_species_bavrn_state.R
validate_fe_species_bavrn_state | R Documentation |
Regular users will not require this function. Expert users will want to use
it in combination with the constructor fe_species_bavrn_state
.
Regular users, please construct fe_species_bavrn_state
objects with
fe_species_bavrn_state
.
validate_fe_species_bavrn_state(x = character())
x |
An object that is expected to be a correct
|
Returns x
, but this function is mainly called for its side
effect which is pointing out any violations of the
fe_species_bavrn_state
object specifications. In case of such
violations, the function will terminate with an error.
# Passes validation
spec_ids <- as.character(c(30, 30, 30, 10, 10, 10, 10, 20, 20, 80))
spec_ids <- new_fe_species_bavrn_state(spec_ids)
validate_fe_species_bavrn_state(spec_ids)
# Validating the following spec_ids throws an error due to
# non-supported species codes
spec_ids <- as.character(c(30, 30, 8712, 10, 10, 10, 349, 20, 20, 80))
spec_ids <- new_fe_species_bavrn_state(spec_ids)
try(
validate_fe_species_bavrn_state(spec_ids)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.