[adegenet-forum] xvalDapc, help for arguments "x" and "grp"

Maïlis mailis at kwata.net
Tue Jan 26 16:02:40 CET 2016


Hello,

I am contacting you because I use the DAPC fonction of adegenet package 
without encountering any particular problems. However, I would like to 
use the cross validation, and that's when it no longer works..

/> database<-read.table(file.choose("C:/Users/.../XXX.txt"), 
header=TRUE, sep=",",na.strings="-9")//
//> x<- df2genind(data.frame(database), sep="/", ncode=3, p=NULL, 
NA.char="-9", ploidy=2, type=c("codom"),strata=NULL, hierarchy=NULL)//
///// GENIND OBJECT ///////////
//
// // 341 individuals; 7 loci; 164 alleles; size: 264.9 Kb//
//
// // Basic content//
//   @tab:  341 x 164 matrix of allele counts//
//   @loc.n.all: number of alleles per locus (range: 13-30)//
//   @loc.fac: locus factor for the 164 columns of @tab//
//   @all.names: list of allele names for each locus//
//   @ploidy: ploidy of each individual  (range: 2-2)//
//   @type:  codom//
//   @call: df2genind(X = data.frame(database), sep = "/", ncode = 3, 
pop = NULL, //
//    NA.char = "-9", ploidy = 2, type = c("codom"), strata = NULL, //
//    hierarchy = NULL)//
//
// // Optional content//
//   - empty -//
//Warning message://
//In df2genind(data.frame(database), sep = "/", ncode = 3, p = NULL,  ://
//  duplicate labels detected for some individuals; using generic labels//
//
//> grp<-find.clusters(x, max.n.clust=9)//
//Choose the number PCs to retain (>=1): 140//
//Choose the number of clusters (>=2): 6//
//> dapc1<-dapc(x,grp$grp)//
//Choose the number PCs to retain (>=1): 40//
//Choose the number discriminant functions to retain (>=1): 5/

It works but, for using xvalDapc
I don't know what to choose as an argument for "x" and "grp". I tried 
severals things but that didn't work.
Can you advise me on the arguments to use?


Thank you in advance for your reply,

Best regards,

Maïlis



---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20160126/d7e4f3e8/attachment-0001.html>


More information about the adegenet-forum mailing list