genind2genpop {adegenet} | R Documentation |
The function genind2genpop
converts genotypes data
(genind) into alleles counts per population (genpop).
genind2genpop(x,pop=NULL,missing=c("NA","0","chi2"),quiet=FALSE)
x |
an object of class genind . |
pop |
a factor giving the population of each genotype in 'x'. If note provided, seeked in x@pop, but if given, the argument prevails on x@pop. |
missing |
can be "NA", "0", or "chi2". See details for more information. |
quiet |
logical stating whether a conversion message must be printed (TRUE,default) or not (FALSE). |
The values of the 'missing' argument in genind2genpop
have the following effects:
- "NA": if all genotypes of a population for a given allele are
missing, count value will be NA
- "0": if all genotypes of a population for a given allele are
missing, count value will be 0
- "chi2": if all genotypes of a population for a given allele are missing, count value will be that of a theoretical count in of a Chi-squared test. This is obtained by the product of the margins sums divided by the total number of alleles.
A genpop object. The component @other in 'x' is passed to the created genpop object.
Thibaut Jombart jombart@biomserv.univ-lyon1.fr
data(nancycats) nancycats catpop <- genind2genpop(nancycats) catpop summary(catpop)