pegas (version 0.12)

by.loci: Summary by Population of 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)

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

Value

a list by default indexed by locus.

Details

The default FUN = NULL calculates allele frequencies for each population in data.

See Also

by

Examples

Run this code
# NOT RUN {
data(jaguar)
by(jaguar)
by(na.omit(jaguar))
# }

Run the code above in your browser using DataCamp Workspace