selpopsize: Select genotypes of well-represented populations

Description Usage Arguments Value Author(s) See Also Examples

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

1
2
## S4 method for signature 'genind'
selPopSize(x,pop=NULL,nMin=10)

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.

Value

A genind object.

Author(s)

Thibaut Jombart t.jombart@imperial.ac.uk

See Also

seploc, repool

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
data(microbov)

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

obj
table(pop(obj))

## End(Not run)

adegenet documentation built on Oct. 10, 2021, 1:09 a.m.