Learn R Programming

strataG (version 1.0.5)

gtypes2loci: Convert Between gtypes And loci objects.

Description

Convert a gtypes object to a loci object.

Usage

gtypes2loci(x)
loci2gtypes(x, description = NULL)

Arguments

x
a gtypes or loci formatted object.
description
a label for the gtypes object (optional).

See Also

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

Examples

Run this code
data(msats.g)

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

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

Run the code above in your browser using DataLab