merge_taxa: Merge concepts or move names

View source: R/merge_taxa.R

merge_taxaR Documentation

Merge concepts or move names

Description

Merge taxon concepts form a taxlist object into single ones.

Usage

merge_taxa(object, ...)

## S3 method for class 'taxlist'
merge_taxa(object, concepts, level, print_output = FALSE, ...)

Arguments

object, taxlist

Object of class taxlist.

...

Further arguments to be passed to or from other methods.

concepts

Numeric (integer) vector including taxon concepts to be merged.

level

Character vector indicating the lowest level for merging.

print_output

Logical value indicating whether the merged concept should be displayed in the console.

Details

Taxon concepts indicated in argument concepts will be merged into a single concept. The new concept inherits the ID and respective attributes from slots taxonRelations and taxonTraits from the first taxon concept indicated in argument concepts.

For convenience the resulting concept can be displayed by setting print_output=TRUE but only when using argument concepts.

An alternative application of this function is implemented through the argument level, where all lower rank taxa will be merged to the indicated level or higher (if parent of merged taxa are at a higher rank).

Value

An object of class taxlist.

Author(s)

Miguel Alvarez kamapu78@gmail.com

Examples

## Merge Cyperus papyrus and Cyperus dives
summary(Easplist, c(206, 197))

sp_list <- merge_taxa(object = Easplist, concepts = c(206, 197),
    print_output = TRUE)

taxlist documentation built on March 31, 2023, 5:22 p.m.