Learn R Programming

taxlist (version 0.3.0)

merge_to_parent: Merge taxa to their respective parents

Description

Aggregation of taxon concepts to their respective parents. All names of aggregated concepts will become synonyms in the target parent.

Usage

merge_to_parent(object, ...)

# S3 method for taxlist merge_to_parent(object, concept_id, ...)

Value

An object of class taxlist with merged taxa.

Arguments

object

An object of class taxlist.

...

Further arguments passed among methods.

concept_id

A vector of IDs (TaxonConceptID) of taxa that will be aggregated into their respective parents. Note that if one of the IDs is simultaneously the parent of another ID in the vector, this function will retrieve an error message.

See Also

merge_taxa()

Examples

Run this code
## Subset with Kyllinga species
ky <- subset(Easplist, TaxonName == "Kyllinga", keep_children = TRUE,
    keep_parents = TRUE)
ky
indented_list(ky)

## Merge two species with the genus
summary(ky, c(346, 50400))
summary(ky, "Kyllinga", exact = TRUE)
ky <- merge_to_parent(ky, c(346, 50400))

summary(ky, "Kyllinga", exact = TRUE)

Run the code above in your browser using DataLab