formatTax: Format Taxonomic Information

View source: R/formatTax.R

formatTaxR Documentation

Format Taxonomic Information

Description

This function edits and standardizes the names of plant species and families

Usage

formatTax(
  tax,
  use.suggestion = TRUE,
  tax.name = "scientificName",
  rm.rank = FALSE,
  tax.names = c("scientificName.new", "scientificNameAuthorship"),
  db = c("bfo"),
  sug.dist = 0.9,
  use.authors = FALSE,
  drop.cols = c("tmp.ordem", "family", "verbatimSpecies", "author", "full_sp",
    "authorship", "id"),
  fam.name = "family",
  gen.name = "genus",
  spp.name = "scientificName"
)

Arguments

tax

a data.frame containing the taxonomic information to be edited.

use.suggestion

logical. Should the edited species names be used instead of the input species names? Defaults to TRUE.

tax.name

character. Name of the columns containing the species name. Default to "scientificName"

rm.rank

logical. Should the infra-specific rank abbreviation be removed from the name? Default to FALSE

tax.names

character. Names of the columns containing the species names and authors. Defaults to 'scientificName.new' and 'scientificNameAuthorship'.

db

the list of database to be consulted for valid names, in their preferred order of priority. Only the results from Brazilian Flora 2020 ('bfo'), The Plant List ('tpl') or both are currently implemented.

sug.dist

a fraction expressing the maximum distance allowed between the original species name and the suggested species name, which is passed to the arguments suggestion.distance of function flora::get.taxa() and max.distance of function Taxonstand::TPL(). Defaults to 0.9.

use.authors

logical. Should all authors names be verified (takes longer)? Default to TRUE.

drop.cols

character. Name of columns that should be dropped from the results.

fam.name

character. The name of the column containing the family names. Default to "family".

gen.name

character. The name of the column containing the genus names. Default to "genus"

spp.name

character. The name of the column containing the species names. Default to "scientificName"

Details

The function works as a wrapper, where the individuals steps of the proposed plantR workflow for editing taxonomic information are performed altogether (see the plantR tutorial and the help of each function for details).

The input data frame usually contains the following taxonomic fields: "family", "genus", "scientificName" and "scientificNameAuthorship". But users can define the names for their own data.

Value

The input data frame tax, plus the new columns with the formatted information. The new columns have the same name of the Darwin Core standards, but followed by the suffix '.new'.

See Also

fixSpecies, prepSpecies and prepFamily.


LimaRAF/plantR documentation built on Jan. 1, 2023, 10:18 a.m.