dct_add_row {dwctaxon} | R Documentation |
Add row(s) to a taxonomic database
Description
Add one or more rows to a taxonomic database in Darwin Core (DwC) format.
Usage
dct_add_row(
tax_dat,
taxonID = NULL,
scientificName = NULL,
taxonomicStatus = NULL,
acceptedNameUsageID = NULL,
acceptedNameUsage = NULL,
new_dat = NULL,
fill_taxon_id = dct_options()$fill_taxon_id,
fill_usage_id = dct_options()$fill_usage_id,
taxon_id_length = dct_options()$taxon_id_length,
stamp_modified = dct_options()$stamp_modified,
strict = dct_options()$strict,
...
)
Arguments
tax_dat |
Dataframe; taxonomic database in DwC format. |
taxonID |
Character or numeric vector; values to add to taxonID column.
Ignored if |
scientificName |
Character vector; values to add to scientificName
column. Ignored if |
taxonomicStatus |
Character vector; values to add to taxonomicStatus
column. Ignored if |
acceptedNameUsageID |
Character or numeric vector; values to add to
acceptedNameUsageID column. Ignored if |
acceptedNameUsage |
Character vector; values to add to acceptedNameUsage
column. Ignored if |
new_dat |
A dataframe including columns corresponding to one or more of
the above arguments, except for |
fill_taxon_id |
Logical vector of length 1; if |
fill_usage_id |
Logical vector of length 1; if |
taxon_id_length |
Numeric vector of length 1; how many characters should be included in automatically generated values of taxonID? Must be between 1 and 32, inclusive. Default |
stamp_modified |
Logical vector of length 1; should the |
strict |
Logical vector of length 1; should taxonomic checks be run on the updated taxonomic database? Default |
... |
Additional data to add, specified as sets of named
character or numeric vectors; e.g., |
Details
fill_taxon_id
and fill_usage_id
only act on the newly added data (they
do not fill columns in tax_dat
).
If "taxonID" is not provided for the new row and fill_taxon_id
is TRUE
,
a value for taxonID will be automatically generated from the md5 hash digest
of the scientific name.
To modify settings used for validation if strict
is TRUE
,
use dct_options()
.
Value
Dataframe; taxonomic database in DwC format.
Examples
tibble::tibble(
taxonID = "123",
scientificName = "Foogenus barspecies",
acceptedNameUsageID = NA_character_,
taxonomicStatus = "accepted"
) |>
dct_add_row(
scientificName = "Foogenus barspecies var. bla",
parentNameUsageID = "123",
nameAccordingTo = "me",
strict = TRUE
)