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 morphodata.

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 missingPercentage will be removed.

characterName

vector of characters to be removed.

Value

an object of class morphodata with the following elements:

ID

IDs of each row of data object.

Population

population membership of each row of data object.

Taxon

taxon membership of each row of data object.

data

data.frame of individuals (rows) and values of measured morphological characters (columns).

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")

[Package MorphoTools2 version 1.0.1.1 Index]