[adegenet-forum] xvalDapc error message

Julian Dupuis jrdupuis at ualberta.ca
Fri May 31 21:06:56 CEST 2013


Hello,

I am trying to use the new xvalDapc function to determine the ideal number
of PCs to retain in my DAPC analysis, but am having trouble getting it to
work. Here's the code I'm inputting:

xval <- xvalDapc(JRD1NoNa at tab, pop(JRD1), n.pca.max=150, n.da=NULL,
n.pca=NULL, center=TRUE, scale=FALSE, n.rep=10)

And this is the error message I receive:

Error in ldaX$scaling[, 1:n.da, drop = FALSE] : subscript out of bounds


I've searched around for similar problems, but haven't found anything
relating specifically to the lda function in MASS. I'm wondering if it
might just be a problem with MASS being out of date with the new version of
R/adegenet?

Any help would be appreciated, and please let me know if I could include
anything else to help identify the problem (my R expertise is pretty
minimal). Also, if anyone has any insight/opinions on alternate ways to
determine the ideal number of PCs to retain in a DAPC (e.g. the
optim.a.score function), I would be interesetd to hear them.

Thanks in advance,

Julian Dupuis


-- 
Julian Rowe Dupuis
Ph.D. Candidate
Dept of Biological Sciences
CW405, Biol. Sci. Centre
University of Alberta
Edmonton, Alberta, CAN
T6G 2E9
Office: Earth Sciences 1-52A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20130531/af2d72f4/attachment.html>


More information about the adegenet-forum mailing list