taxlist (version 0.1.7)

clean: Clean Orphaned Records

Description

Manipulation of slots may generate orphaned entries in '>taxlist objects. The function 'clean' deletes such entries and restores the consistency of the objects.

Usage

# S4 method for taxlist
clean(object, times=2, ...)

Arguments

object

A '>taxlist object.

times

An integer indicating how many times the cleaning should be repeated.

...

Further arguments passed from or to other methods.

Value

A clean '>taxlist object.

Details

Cleaning of objects will follow the deletion of:

  • orphaned names.

  • orphaned taxon trait entries.

  • orphaned parent entries.

Examples

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

## Direct manipulation of slot taxonRelations generates an invalid object
Easplist@taxonRelations <- Easplist@taxonRelations[1:5,]
summary(Easplist)

## Now apply cleaning
Easplist <- clean(Easplist)
summary(Easplist)
# }

Run the code above in your browser using DataCamp Workspace