gn_parse {rgnparser} | R Documentation |
gn_parse
Description
extract names using gnparser
Usage
gn_parse(
x,
threads = 1,
batch_size = NULL,
ignore_tags = FALSE,
cultivar = FALSE,
capitalize = FALSE,
diaereses = FALSE,
details = FALSE
)
Arguments
x |
(character) vector of scientific names. required |
threads |
(integer/numeric) number of threads to run for parallel
processing. Setting to |
batch_size |
(integer/numeric) maximum number of names in a
batch send for processing. default: |
ignore_tags |
(logical) ignore HTML entities and tags when
parsing. default: |
cultivar |
(logical) adds support for botanical cultivars like
|
capitalize |
(logical) capitalizes the first letter of name-strings.
default: |
diaereses |
(logical) preserves diaereses within names, e.g.
|
details |
(logical) Return more details for a parsed name |
Value
a list
Examples
trys <- function(x) try(x, silent=TRUE)
if (interactive()) {
x <- c("Quadrella steyermarkii (Standl.) Iltis & Cornejo",
"Parus major Linnaeus, 1788", "Helianthus annuus var. texanus")
trys(gn_parse(x[1]))
trys(gn_parse(x[2]))
trys(gn_parse(x[3]))
trys(gn_parse(x))
# details
w <- trys(gn_parse(x, details = TRUE))
w[[1]]$details # details for one name
lapply(w, "[[", "details") # details for all names
z <- trys(gn_parse(x, details = FALSE)) # compared to regular
z
}