genpop constructor {adegenet} | R Documentation |
Constructor for genpop objects.
The function genpop
creates a genpop object from
a matrix of alleles counts where genotypes are in rows and alleles
in columns. This table must have correct names for rows and
columns.
The function as.genpop
is an alias for genpop
function.
is.genpop
tests if an object is a valid genpop object.
Note: to get the manpage about genpop, please type 'class ? genpop'.
genpop(tab,prevcall=NULL, ploidy=as.integer(2), type=c("codom","PA")) as.genpop(tab, prevcall=NULL, ploidy=as.integer(2), type=c("codom","PA")) is.genpop(x)
tab |
a pop x alleles matrix which terms are numbers of alleles, i.e. like in a genpop object |
prevcall |
call of an object |
ploidy |
an integer indicating the degree of ploidy of the genotypes. Beware: 2 is not an integer, but as.integer(2) is. |
type |
a character string indicating the type of marker: 'codom' stands for 'codominant' (e.g. microstallites, allozymes); 'PA' stands for 'presence/absence' (e.g. AFLP, RAPD). |
x |
an object |
For genpop
and as.genpop
, a genpop object. For is.genpop
, a logical.
Thibaut Jombart t.jombart@imperial.ac.uk
"genpop"
, and genind2genpop
for
conversion from a genind to a genpop object.
data(nancycats) obj <- genind2genpop(nancycats) # isolate one locus, fca77 obj <- seploc(obj)$"fca77" obj