View source: R/keep.itemInMorphodataObject.R
| keepTaxon | R Documentation |
These functions keep only selected taxa, populations, samples or morphological characters in morphodata object. The samples can be kept by names using sampleName argument, or by the threshold. Each sample holding less or equal portion of missing data than the desired threshold (missingPercentage) will be kept. Only one parameter can be specified in one run.
keepTaxon(object, taxonName)
keepPopulation(object, populationName)
keepSample(object, sampleName = NULL, missingPercentage = NA)
keepCharacter(object, characterName)
object |
an object of class |
taxonName |
vector of taxa to be kept. |
populationName |
vector of populations to be kept. |
sampleName |
vector of samples to be kept. |
missingPercentage |
a numeric, samples holding less or equal portion of missing data than specified by |
characterName |
vector of characters to be kept. |
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 |
|
data(centaurea)
centaurea.hybr = keepTaxon(centaurea, "hybr")
centaurea.PhHybr = keepTaxon(centaurea, c("ph", "hybr"))
centaurea.PREL = keepPopulation(centaurea, "PREL")
centaurea.NA_0.1 = keepSample(centaurea, missingPercentage = 0.1)
centaurea.stem = keepCharacter(centaurea, c("SN", "SF", "ST"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.