Parse embedded classifications, optionally checking the results via a database.
class_from_class(class, class_key, class_regex, class_sep, class_rev, database,
...)
(character
)
The unparsed class information.
(character
of length 1)
The identity of the capturing groups defined using class_iregex
.
The length of class_key
must be equal to the number of capturing groups specified in class_regex
.
Any names added to the terms will be used as column names in the output.
At least "taxon_id"
or "name"
must be specified.
Only "taxon_info"
can be used multiple times.
Each term must be one of those described below:
taxon_id
A unique numeric id for a taxon for a particular database
(e.g. ncbi accession number).
Requires an internet connection.
name
The name of a taxon. Not necessarily unique, but are interpretable
by a particular database
. Requires an internet connection.
taxon_info
Arbitrary taxon info you want included in the output. Can be used more than once.
(character
of length 1)
A regular expression with capturing groups indicating the locations of data for each taxon in the class
term in the key
argument.
The identity of the information must be specified using the class_key
argument.
(character
of length 1)
Used with the class
term in the key
argument.
The character(s) used to separate individual taxa within a classification.
(logical
of length 1)
Used with the class
term in the key
argument.
If TRUE
, the order of taxon data in a classification is reversed to be specific to broad.
(character
of length 1) The name of the database that patterns given in
parser
will apply to. Valid databases include "ncbi", "itis", "eol", "col", "tropicos",
"nbn", and "none". "none"
will cause no database to be quired; use this if you want to not use the
internet. NOTE: Only "ncbi"
has been tested so far.
Not used
list
of data.frame