reindex | R Documentation |
The assignment of new identifiers must take into account all possible occurrences of such indices in taxlist objects in order to maintain their validity.
reindex(object, ...)
## S3 method for class 'taxlist'
reindex(object, old, new, idx = "TaxonConceptID", ...)
reindex(object, ...) <- value
## S3 replacement method for class 'taxlist'
reindex(object, ...) <- value
object |
A taxlist object. |
... |
Further arguments to be passed among methods. |
old |
A vector with old identifiers to be re-indized. This may contain
all identifiers or only a part of them. If only a part, the rest of
indices will be preserved. If the changes insert duplicated identifiers,
an error message will be retrieved. If missing, all identifiers in
|
new , value |
A vector with the new identifiers. It has to be of
the same length as |
idx |
Name of the index to be changed, which means |
An object of class taxlist with modified identifiers.
## Copy taxonomic list
sp_list <- Easplist
summary(sp_list, "papyrus")
## Re-index taxon concepts
reindex(sp_list) <- id_generator(nrow(sp_list@taxonRelations),
mode = "character")
## Re-index taxon usage names
reindex(sp_list, idx = "TaxonUsageID") <- id_generator(nrow(sp_list@taxonNames),
mode = "character")
## Re-index taxon views
reindex(sp_list, idx = "ViewID") <- id_generator(nrow(sp_list@taxonViews),
mode = "character")
## Check result
validObject(sp_list)
summary(sp_list, "papyrus")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.