genind constructor {adegenet}R Documentation

genind constructor

Description

Constructor for genind objects.
The function genind creates a genind object from a matrix of allelic frequency where genotypes are in rows and alleles in columns. This table must have correct names for rows and columns.

The function as.genind is an alias for genind function.

is.genind tests if an object is a valid genind object.

Note: to get the manpage about genind, please type 'class ? genind'.

Usage

genind(tab,pop=NULL,prevcall=NULL, ploidy=2, type=c("codom","PA"))
as.genind(tab,pop=NULL,prevcall=NULL, ploidy=2, type=c("codom","PA"))
is.genind(x)

Arguments

tab A table corresponding to the @tab slot of a genind object, with individuals in rows and alleles in columns. Its content depends on type (type of marker).
- 'codom': table contains allele frequencies (numeric values summing to 1).
- 'PA': table contains binary values, which indicate presence(1)/absence(0) of alleles.
pop a factor giving the population of each genotype in 'x'
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).
x an object

Value

For genind and as.genind, a genind object. For is.genind, a logical.

Author(s)

Thibaut Jombart t.jombart@imperial.ac.uk

See Also

"genind", and import2genind for importing from various types of file.

Examples

data(nancycats)
nancycats@loc.names

# isolate one marker, fca23
obj <- seploc(nancycats)$"fca23"
obj

[Package adegenet version 1.2-3 Index]