by.loci: Summary by Population or Other Factor

View source: R/summary.loci.R

by.lociR Documentation

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

Details

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

Value

a list by default indexed by locus.

Author(s)

Emmanuel Paradis

See Also

by

Examples

data(jaguar)
by(jaguar)
by(na.omit(jaguar))

pegas documentation built on May 29, 2024, 2:27 a.m.