Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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

Examples

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

pegas

Population and Evolutionary Genetics Analysis System

v1.0
GPL (>= 2)
Authors
Emmanuel Paradis [aut, cre, cph] (<https://orcid.org/0000-0003-3092-2199>), Thibaut Jombart [aut, cph] (<https://orcid.org/0000-0003-2226-8692>), Zhian N. Kamvar [aut, cph] (<https://orcid.org/0000-0003-1458-7108>), Brian Knaus [aut, cph] (<https://orcid.org/0000-0003-1665-4343>), Klaus Schliep [aut, cph] (<https://orcid.org/0000-0003-2941-0161>), Alastair Potts [aut, cph] (<https://orcid.org/0000-0003-0919-7279>), David Winter [aut, cph] (<https://orcid.org/0000-0002-6165-0029>)
Initial release
2021-04-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.