Learn R Programming

adegenet (version 2.1.10)

selPopSize: Select genotypes of well-represented populations

Description

The function selPopSize checks the sample size of each population in a genind object and keeps only genotypes of populations having a given minimum size.

Usage

# S4 method for genind
selPopSize(x,pop=NULL,nMin=10)

Value

A genind object.

Arguments

x

a genind object

pop

a vector of characters or a factor giving the population of each genotype in 'x'. If not provided, seeked from x$pop.

nMin

the minimum sample size for a population to be retained. Samples sizes strictly less than nMin will be discarded, those equal to or greater than nMin are kept.

Author

Thibaut Jombart t.jombart@imperial.ac.uk

See Also

seploc, repool

Examples

Run this code
if (FALSE) {
data(microbov)

table(pop(microbov))
obj <- selPopSize(microbov, n=50)

obj
table(pop(obj))
}

Run the code above in your browser using DataLab