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

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

Examples

## Not run: 
data(microbov)

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

obj
table(pop(obj))

## End(Not run)

adegenet

Exploratory Analysis of Genetic and Genomic Data

v2.1.3
GPL (>= 2)
Authors
Thibaut Jombart [aut] (<https://orcid.org/0000-0003-2226-8692>), Zhian N. Kamvar [aut, cre] (<https://orcid.org/0000-0003-1458-7108>), Caitlin Collins [ctb], Roman Lustrik [ctb], Marie-Pauline Beugin [ctb], Brian J. Knaus [ctb], Peter Solymos [ctb], Vladimir Mikryukov [ctb], Klaus Schliep [ctb], Tiago Maié [ctb], Libor Morkovsky [ctb], Ismail Ahmed [ctb], Anne Cori [ctb], Federico Calboli [ctb], RJ Ewing [ctb], Frédéric Michaud [ctb], Rebecca DeCamp [ctb], Alexandre Courtiol [ctb] (<https://orcid.org/0000-0003-0637-2959>)
Initial release

We don't support your browser anymore

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