SubsetByTaxon {polyRAD} | R Documentation |
Create RADdata Object with a Subset of Taxa
Description
This function is used for removing some of the taxa from a dataset stored in a
RADdata
object.
Usage
SubsetByTaxon(object, ...)
## S3 method for class 'RADdata'
SubsetByTaxon(object, taxa, ...)
Arguments
object |
A |
taxa |
A character or numeric vector indicating which taxa to retain in the output. |
... |
Additional arguments (none implemented). |
Details
This function may be used for subsetting a RADdata
object either
immediately after data import, or after additional analysis has been
performed. Note however that estimation of allele frequencies, genotype
prior probabilities, PCA, etc. are very dependent on what samples
are included in the dataset. If those calculations have already been
performed, the results will be transferred to the new object but not
recalculated.
Value
A RADdata
object containing only the taxa listed in taxa
.
Author(s)
Lindsay V. Clark
See Also
Examples
# load data for this example
data(exampleRAD)
exampleRAD
# just keep the first fifty taxa
subsetRAD <- SubsetByTaxon(exampleRAD, 1:50)
subsetRAD
[Package polyRAD version 2.0.0 Index]