Last chance! 50% off unlimited learning
Sale ends in
df2genind
, or from a file with a
recognized extension.
The function import2genind
detects the extension of
the file given in argument and seeks for an appropriate import
function to create a genind
object.
Current recognized formats are :
- GENETIX files (.gtx)
- Genepop files (.gen)
- Fstat files (.dat)
- STRUCTURE files (.str or .stru)import2genind(file,missing=NA,quiet=FALSE, ...)
read.structure
)genind
genind
objects.
For instance, conversions made by GENETIX to Fstat may change the
the sorting of the genotypes; GENETIX stores individual names whereas
Fstat does not; Genepop chooses a sample's name from the name of its last
genotype; etc.import2genind
, read.genetix
,
read.fstat
, read.structure
, read.genepop
import2genind(system.file("files/nancycats.gtx",
package="adegenet"))
import2genind(system.file("files/nancycats.dat",
package="adegenet"))
import2genind(system.file("files/nancycats.gen",
package="adegenet"))
import2genind(system.file("files/nancycats.str",
package="adegenet"), n.ind=237, n.loc=9, col.lab=1, col.pop=2, ask=FALSE)
Run the code above in your browser using DataLab