Skip to contents

We allow four three for uploading the information from wcvp_names:

  • By choosing a file path to a csv file containing the information using filepath.

  • By loading an R save (file type .RData, .rdata, .rda or .rds) via filepath.

  • By using the package rWCVPData, by setting use_rWCVPData = TRUE.

Usage

import_wcvp_names(
  filepath = NULL,
  use_rWCVPdata = FALSE,
  wanted_columns = c("plant_name_id", "taxon_rank", "taxon_status", "family", "genus",
    "species", "lifeform_description", "climate_description", "taxon_name",
    "taxon_authors", "accepted_plant_name_id", "powo_id")
)

Arguments

filepath

path to wcvp_names.csv file.

use_rWCVPdata

Flag for whether we use rWCVPdata to get wcvp_names

wanted_columns

specify extra columns to extract from wcvp_names.csv.

Value

Data frame of desired information from wcvp_names

Details

The columns extracted always include:"plant_name_id", "taxon_name", "taxon_authors", "taxon_rank", "accepted_plant_name_id" and "powo_id". Further columns can be extracted using wanted_columns parameter, where either columns names or indices can be used.

We add two new columns:

  • 'taxon_length' which contains the number of characters in a given taxon_name used when searching for typos in garden databases.

  • 'is_autonym' contains a logical flag for whether the taxon name is an autonym. This is used to match autonyms in garden databases.

Moreover, the code performs fixes to the data provided namely:

  • Checks for '*' and '**' in taxon_name and taxon_rank, which should be 'var.' and 'f.' instead.

  • There are potentially plants that are synonyms without an accepted form in wcvp_names. However, in some cases the accepted form can be found on POWO online. Therefore, in this case we scrap POWO online for an accepted form and add to the loaded information in wcvp_names.

  • No author is provided for autonyms, so we extract the corresponding author from matching GenusSpecies record.