Gets the scientific name for one or more vernacular names based on the
taxonomic information found in the metadata (package$taxonomic
).
The match is performed case insensitively.
If a vernacular name is not valid, an error is returned
Usage
get_scientific_name(
package = NULL,
vernacular_name,
datapkg = lifecycle::deprecated()
)
Arguments
- package
Camera trap data package object, as returned by
read_camtrap_dp()
.- vernacular_name
Character vector with input vernacular name(s).
- datapkg
Deprecated. Use
package
instead.
See also
Other exploration functions:
get_cam_op()
,
get_custom_effort()
,
get_effort()
,
get_n_individuals()
,
get_n_obs()
,
get_n_species()
,
get_rai()
,
get_rai_individuals()
,
get_record_table()
,
get_species()
Examples
# One or more vernacular names
get_scientific_name(mica, "beech marten")
#> [1] "Martes foina"
get_scientific_name(mica, c("beech marten", "mallard"))
#> [1] "Martes foina" "Anas platyrhynchos"
# Vernacular names can be passed in different languages
get_scientific_name(mica, c("beech marten", "wilde eend"))
#> [1] "Martes foina" "Anas platyrhynchos"
# Search is performed case insensitively
get_scientific_name(mica, c("MaLLarD"))
#> [1] "Anas platyrhynchos"
if (FALSE) { # \dontrun{
# An error is returned if at least one invalid vernacular name is passed
get_scientfic_name(mica, "this is a bad vernacular name")
# A scientific name is an invalid vernacular name of course
get_scientific_name(mica, c("Castor fiber", "wilde eend"))
} # }