Learn R Programming

graph4lg (version 1.8.0)

loci_to_genind: Convert a loci object into a genind object

Description

This function is exactly the same as loci2genind from pegas package

Usage

loci_to_genind(x, ploidy = 2, na.alleles = c("NA"))

Value

An object of class genind

Arguments

x

An object of class loci to convert

ploidy

An integer indicating the ploidy level (by default, 'ploidy = 2')

na.alleles

A character vector indicating the coding of the alleles to be treated as missing data (by default, 'na.alleles = c("NA")')

Author

P. Savary

Examples

Run this code
data("data_ex_loci")
genind <- loci_to_genind(data_ex_loci, ploidy = 2, na.alleles = "NA")

Run the code above in your browser using DataLab