Learn R Programming

RADami (version 1.1-2)

filter.by: Identify names of loci for which at the requested taxa are present,

Description

Returns the names of loci for which the requested taxa are present at some threshold

Usage

filter.by(dat, taxa, req = NULL,
          threshInds = 3, threshTaxa = 2,
          use.tidyName = FALSE, ...)

Arguments

dat
an object of class pyRAD.loci or summary.pyRAD.loci
taxa
a list of character vectors of taxa or individuals
req
a character vector listing taxa that are required; defaults to none
threshInds
a vector of integers corresponding to taxa, indicating the threshold number of individuals
threshTaxa
a single integer, indicating how many taxa are required at their threshInds level to export a locus
use.tidyName
whether to use the tidyName function for matching taxon names; useful if there is a mix of uppercase, lowercase, special characters etc. that are not really essential for distinguishing taxa
extra arguments to tidyName

Value

A list with two items:
loci
a character vector of loci that satisfy the filter criteria
loc.mat
a boolean matrix indicating for each locus which taxa satisfy their individuals threshold

Details

Not currently called by any other functions in this package, but useful for quickly identifying loci for which data are present in a specified number of individuals

See Also

subset.pyRAD.loci