removeTaxon {MorphoTools2} | R Documentation |
Remove Items (Taxa, Populations, Morphological Characters) from Morphodata Object
Description
These functions remove particular taxa, populations, samples or morphological characters from morphodata
object. The samples can be deleted by names using sampleName
argument, or each sample above the desired threshold missingPercentage
will be deleted. Only one parameter can be specified in one run.
Usage
removeTaxon(object, taxonName)
removePopulation(object, populationName)
removeSample(object, sampleName = NULL, missingPercentage = NA)
removeCharacter(object, characterName)
Arguments
object |
object of class |
taxonName |
vector of taxa to be removed. |
populationName |
vector of populations to be removed. |
sampleName |
vector of samples to be removed. |
missingPercentage |
a numeric, samples holding more missing data than specified by |
characterName |
vector of characters to be removed. |
Value
an object of class morphodata
with the following elements:
ID |
IDs of each row of |
Population |
population membership of each row of |
Taxon |
taxon membership of each row of |
data |
|
Examples
data(centaurea)
centaurea.3tax = removeTaxon(centaurea, "hybr")
centaurea.PsSt = removeTaxon(centaurea, c("ph", "hybr"))
centaurea.short = removePopulation(centaurea, c("LIP", "PREL"))
centaurea.NA_0.1 = removeSample(centaurea, missingPercentage = 0.1)
centaurea.short = removeCharacter(centaurea, "LL")