The function seppop splits a genind object by
population, returning a list of objects whose components each
correspond to a population.
By default, components of the list are genind objects.
It can also be a matrix of genotypes corresponding to the x$tab.
Usage
## S3 method for class 'genind':
seppop(x,pop=NULL,truenames=TRUE,res.type=c("genind","matrix"),
drop=FALSE, treatOther=TRUE)
Arguments
x
a genind object
pop
a factor giving the population of each genotype in 'x'. If
not provided, seeked in x$pop.
truenames
a logical indicating whether true names should be
used (TRUE, default) instead of generic labels (FALSE); used if
res.type is "matrix".
res.type
a character indicating the type of returned results,
a list of genind object (default) or a matrix of data
corresponding to the 'tab' slots.
drop
a logical stating whether alleles that are no longer
present in a subset of data should be discarded (TRUE) or kept anyway
(FALSE, default).
treatOther
a logical stating whether elements of the
@other slot should be treated as well (TRUE), or not
(FALSE). See details in accessor documentations (pop).
Value
According to 'res.type': a list of genind object
(default) or a matrix of data corresponding to the 'tab' slots.