by.loci: Summary by Population or Other Factor
Description
This is an implementation of the generic by
function which applies a function to some data for a each level of a
categorical factor.
Usage
# S3 method for loci
by(data, INDICES = data$population, FUN = NULL, ..., simplify = TRUE)
Value
a list by default indexed by locus.
Arguments
- data
an object of class "loci"
.
- INDICES
a vector of the same length as the number of rows in data
.
- FUN
a function
- ...
(currently unused).
- simplify
(currently unused).
Details
The default FUN = NULL
calculates allele frequencies for each
population in data
.
Examples
Run this codedata(jaguar)
by(jaguar)
by(na.omit(jaguar))
Run the code above in your browser using DataLab