strataG (version 2.4.905)

gtypes2genind: Convert Between gtypes And genind objects.

Description

Convert a gtypes object to a genind object and vice-versa.

Usage

gtypes2genind(x, type = c("codom", "PA"))

genind2gtypes(x)

Arguments

x

either a '>gtypes or '>genind object to convert from.

type

a character string indicating the type of marker for '>genind objects: 'codom' stands for 'codominant' (e.g. microstallites, allozymes); 'PA' stands for 'presence/absence' markers (e.g. AFLP, RAPD).

See Also

initialize.gtypes, df2gtypes, sequence2gtypes, as.data.frame.gtypes, gtypes2loci

Examples

Run this code
# NOT RUN {
data(msats.g)

# Convert to genind
gi <- gtypes2genind(msats.g)
gi

# Convert to gtypes
gt <- genind2gtypes(gi)
gt

# }

Run the code above in your browser using DataLab