<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Hi,</div>
<div><br>
</div>
<div>I am trying to use xval to cross-validate the number of PCs to retain for a DAPC using the below command and I am getting the following error msg:</div>
<div><br>
</div>
<div>xval_nopopbp75_cnt75_cl96_maf5to1 <- xvalDapc(nopop_bp75_cnt75_cl96_maf5to1NoNA@tab, nopop_clust$grp)</div>
<div><br>
</div>
<div>There were 50 or more warnings (use warnings() to see the first 50)</div>
<div>> warnings()</div>
<div>Warning messages:</div>
<div>1: In if (result == "overall") { ... :</div>
<div>  the condition has length > 1 and only the first element will be used</div>
<div>2: In if (result == "groupMean") { ... :</div>
<div>  the condition has length > 1 and only the first element will be used</div>
<div><span style="font-family: Calibri;"><br>
</span></div>
<div>Using find.clusters 2 groups are found but 1 group has 83 individuals and the other group has 4. Is the discrepancy in sample size causing the problem with xval? And if so how can I determine the optimal number of PC’s to keep? I have attached my input
 file and the script that I use.</div>
<div><br>
</div>
<div>Also when conduction DAPC should you remove the NA’s in the data? The DAPC seems to work when the Nas are not removed, but when I run it with them removed I get different results.</div>
<div><br>
</div>
<div>Thanks for your help!</div>
<div><br>
</div>
<div>Cheers, </div>
<div><span style="font-family: Calibri;">Laura</span></div>
<div>
<div><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" face="Calibri"><br>
</font></font></div>
<div><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" face="Calibri">PhD Candidate</font></font></div>
<div><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" face="Calibri">Department of Ecology, Environment and Evolution| La Trobe University | Bundoora 3086 | Australia</font></font></div>
<div><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" face="Calibri"><br>
</font></font></div>
<div><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" face="Calibri">m: +61 408 642 006 | e: 17869067@students.latrobe.edu.au</font></font></div>
</div>
</body>
</html>