gtypes2genlight: Convert Between 'gtypes' And 'genlight' objects.

View source: R/gtypes2genlight.R

gtypes2genlightR Documentation

Convert Between gtypes And genlight objects.

Description

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

Usage

gtypes2genlight(x)

genlight2gtypes(x)

Arguments

x

either a gtypes or genlight object to convert from.

Author(s)

Eric Archer eric.archer@noaa.gov

See Also

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

Examples

data(msats.g)

# Create simple simulated SNPs
gl1 <- adegenet::glSim(n.ind = 100, n.snp.nonstruc = 1000, ploidy = 2)
gl1

# Convert to gtypes
gt <- genlight2gtypes(gl1)
gt

# Convert back to genlight
gl2 <- gtypes2genlight(gt)
gl2


EricArcher/strataG documentation built on Feb. 12, 2023, 4:11 a.m.