taxlist (version 0.1.7)

merge_taxa: Merge Concepts

Description

Merge taxon concepts form a '>taxlist object into single ones.

Usage

# S4 method for taxlist,numeric,missing
merge_taxa(object, concepts, level,
	print_output=FALSE, ...)

# S4 method for taxlist,missing,character merge_taxa(object, concepts, level, ...)

change_concept(taxlist, UsageID) <- value

Arguments

object,taxlist

Object of class '>taxlist.

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.

UsageID

Numeric vector with taxon usage IDs to be changed from concept.

value

Numeric vector with taxon concept IDs to be assigned to the names.

...

Further arguments to be passed to or from other methods.

Value

An object of class '>taxlist.

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).

Examples

Run this code
# NOT RUN {
library(taxlist)
data(Easplist)

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

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

## Move the name Typha aethiopica to concept 573 (T. latifolia)
change_concept(Easplist, 53130) <- 573
summary(Easplist, c(50105,573))
# }
# NOT RUN {
## Attempting to move an accepted name
change_concept(Easplist, 50105) <- 573
# }

Run the code above in your browser using DataLab