df2taxlist: Convert Data Frames into taxlist Objects

Description Usage Arguments Details Value Author(s) Examples

Description

Taxon lists may be provided in data frame format, which will be converted to a taxlist object.

Usage

1
2
3
4
5
6
7
8
## S4 method for signature 'data.frame,logical'
df2taxlist(x, AcceptedName, ...)

## S4 method for signature 'data.frame,missing'
df2taxlist(x, AcceptedName, ...)

## S4 method for signature 'character,missing'
df2taxlist(x, AcceptedName, ...)

Arguments

x

A data frame or a character vector with taxon names.

AcceptedName

A logical vector indicating accepted names with value TRUE.

...

Additional vectors to be added as columns in slot 'taxonNames'.

Details

In the method 'data.frame', the input data frame must have following columns:

TaxonUsageID

Numeric code for the name.

TaxonConceptID

Numeric code for the concept.

TaxonName

Full name (usage), excluding author name.

AuthorName

Author of the combination (taxon name).

If the argument 'AcceptedName' is missing, all names will be assumed as accepted names. In the alternative 'character' method, author names have to be added as additional vectors.

Be aware that the resulting object misses any information on taxon views, basionyms, parent concepts, hierarchical levels and taxon traits. All those elements can be added a posteriori by further functions provided in this package.

Value

A taxlist object.

Author(s)

Miguel Alvarez, [email protected].

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(taxlist)

## Read the table with names of Cyperus species
Cyperus <- read.csv(file.path(path.package("taxlist"), "cyperus", "names.csv"),
	stringsAsFactors=FALSE)
head(Cyperus)

## Convert to 'taxlist' object
Cyperus <- df2taxlist(Cyperus, AcceptedName=!Cyperus$SYNONYM)
summary(Cyperus)

## Create a 'taxlist' object from character vectors
Plants <- df2taxlist(c("Triticum aestivum","Zea mays"), AuthorName="L.")
summary(Plants, "all")

taxlist documentation built on July 2, 2018, 1:03 a.m.