gtypes2genind: Convert Between 'gtypes' And 'genind' objects.

Description Usage Arguments Author(s) See Also Examples

View source: R/gtypes2genind.R

Description

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

Usage

1
2
3
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).

Author(s)

Eric Archer eric.archer@noaa.gov

See Also

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

Examples

1
2
3
4
5
6
7
8
9
data(msats.g)

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

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

strataG documentation built on Feb. 28, 2020, 9:07 a.m.