dct_drop_row {dwctaxon}R Documentation

Drop row(s) of a taxonomic database

Description

Drop one or more rows from a taxonomic database in Darwin Core (DwC) format by taxonID or scientificName.

Usage

dct_drop_row(tax_dat, taxonID = NULL, scientificName = NULL)

Arguments

tax_dat

Dataframe; taxonomic database in DwC format.

taxonID

Character or numeric vector; taxonID of the row(s) to be dropped.

scientificName

Character vector; scientificName of the row(s) to be dropped.

Details

Only works if values of taxonID or scientificName are unique and non-missing in the taxonomic database (tax_dat).

Either taxonID or scientificName should be provided, but not both.

Value

Dataframe; taxonomic database in DwC format

Examples

# Can drop rows by scientificName or taxonID
dct_filmies |>
  dct_drop_row(scientificName = "Cephalomanes atrovirens Presl")

dct_filmies |>
  dct_drop_row(taxonID = "54133783")

# Can drop multiple rows at once by providing multiple values for
# scientificName or taxonID
dct_filmies |>
  dct_drop_row(
    scientificName = c(
      "Cephalomanes atrovirens Presl",
      "Trichomanes crassum Copel."
    )
  )

dct_filmies |>
  dct_drop_row(
    taxonID = c(
      "54133783", "54133783"
    )
  )

[Package dwctaxon version 2.0.3 Index]