merge_taxa | R Documentation |
Merge taxon concepts form a taxlist object into single ones.
merge_taxa(object, ...)
## S3 method for class 'taxlist'
merge_taxa(
object,
concepts,
level = NULL,
delete_nomatch = FALSE,
print_output = FALSE,
...
)
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 with queried taxonomic ranks. This setting
works only if |
delete_nomatch |
A logical value indicating whether no matched ranks (i.e. top rank and rankless concepts) should be deleted from the output or not. |
print_output |
Logical value indicating whether the merged concept
should be displayed in the console. Thi works only if a vector is
provided at |
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).
An object of class taxlist.
Miguel Alvarez kamapu78@gmail.com
## Merge Cyperus papyrus and Cyperus dives
summary(Easplist, c(206, 197))
merged_cyperus <- merge_taxa(object = Easplist, concepts = c(206, 197),
print_output = TRUE)
## Subset with Kyllinga species
ky <- subset(Easplist, TaxonName == "Kyllinga", keep_children = TRUE,
keep_parents = TRUE)
ky
indented_list(ky)
## Merge to species and family
merge_taxa(ky, level = c("species", "family"))
## Merge to variety and genus
merge_taxa(ky, level = c("variety", "genus"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.