read.structure reads STRUCTURE data files (.str
ou .stru) and convert them into a Note: read.structure is meant for DIPLOID DATA ONLY. Haploid
data with the STRUCTURE format can easily be read into R using
read.table or read.csv and then converted using
df2genind.
read.structure(file, n.ind=NULL, n.loc=NULL, onerowperind=NULL,
col.lab=NULL, col.pop=NULL, col.others=NULL, row.marknames=NULL,
NA.char="-9", pop=NULL, missing=NA, ask=TRUE, quiet=FALSE)genindimport2genind, df2genind,
read.fstat, read.genetix,
read.genepopobj <- read.structure(system.file("files/nancycats.str",package="adegenet"),
onerowperind=FALSE, n.ind=237, n.loc=9, col.lab=1, col.pop=2, ask=FALSE)
objRun the code above in your browser using DataLab