gtypes2loci: Convert Between 'gtypes' And 'loci' objects.

View source: R/gtypes2loci.R

gtypes2lociR Documentation

Convert Between gtypes And loci objects.

Description

Convert a gtypes object to a loci object.

Usage

gtypes2loci(x, sep = "/")

loci2gtypes(x, description = NULL, sep = "/")

Arguments

x

a gtypes or loci formatted object.

sep

character used to separate alleles at a locus.

description

a label for the gtypes object (optional).

Author(s)

Eric Archer eric.archer@noaa.gov

See Also

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

Examples

data(msats.g)

# Convert to loci
lc <- gtypes2loci(msats.g)  
lc  

# Convert to gtypes
gt <- loci2gtypes(lc)
gt 


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