<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello, <br>
    <br>
    <div style="" id="gt-input-tool">
      <div><span class="ita-kd-inputtools-div"></span></div>
    </div>
    <div id="gt-src-c" class="g-unit">
      <div id="gt-src-p"> </div>
    </div>
    <div id="gt-res-content" class="almost_half_cell">
      <div dir="ltr" style="zoom:1">
        <div id="tts_button"><object
            type="application/x-shockwave-flash"
            data="//ssl.gstatic.com/translate/sound_player2.swf"
            id="tts" width="18" height="18"></object></div>
        <div style="" id="gt-input-tool">
          <div><span class="ita-kd-inputtools-div"></span></div>
        </div>
        <div id="gt-src-c" class="g-unit">
          <div id="gt-src-p"> </div>
        </div>
        <div id="gt-res-content" class="almost_half_cell">
          <div dir="ltr" style="zoom:1">
            <div id="tts_button"><object
                type="application/x-shockwave-flash"
                data="//ssl.gstatic.com/translate/sound_player2.swf"
                id="tts" width="18" height="18"></object></div>
            <span id="result_box" class="" lang="en"><span class="hps">I
                am contacting</span> <span class="hps">you because</span>
              <span class="hps">I use the</span> <span class="hps">DAPC
                fonction</span> <span class="hps">of adegenet</span>
              package <span class="hps">without encountering</span> <span
                class="hps">any particular problems.</span> <span
                class="hps">However</span><span>, I would</span> <span
                class="hps">like</span> <span class="hps">to use the</span>
              <span class="hps">cross</span> <span class="hps">validation,</span>
              <span class="hps">and that</span><span>'s when</span> <span
                class="hps">it</span> <span class="hps">no longer
                works..</span></span></div>
        </div>
      </div>
    </div>
    <br>
    <small><i>>
        database<-read.table(file.choose("C:/Users/.../XXX.txt"),
        header=TRUE, sep=",",na.strings="-9")</i><i><br>
      </i><i>> x<- df2genind(data.frame(database), sep="/",
        ncode=3, p=NULL, NA.char="-9", ploidy=2,
        type=c("codom"),strata=NULL, hierarchy=NULL)</i><i><br>
      </i><i>/// GENIND OBJECT /////////</i><i><br>
      </i><i><br>
      </i><i> // 341 individuals; 7 loci; 164 alleles; size: 264.9 Kb</i><i><br>
      </i><i><br>
      </i><i> // Basic content</i><i><br>
      </i><i>   @tab:  341 x 164 matrix of allele counts</i><i><br>
      </i><i>   @loc.n.all: number of alleles per locus (range: 13-30)</i><i><br>
      </i><i>   @loc.fac: locus factor for the 164 columns of @tab</i><i><br>
      </i><i>   @all.names: list of allele names for each locus</i><i><br>
      </i><i>   @ploidy: ploidy of each individual  (range: 2-2)</i><i><br>
      </i><i>   @type:  codom</i><i><br>
      </i><i>   @call: df2genind(X = data.frame(database), sep = "/",
        ncode = 3, pop = NULL, </i><i><br>
      </i><i>    NA.char = "-9", ploidy = 2, type = c("codom"), strata =
        NULL, </i><i><br>
      </i><i>    hierarchy = NULL)</i><i><br>
      </i><i><br>
      </i><i> // Optional content</i><i><br>
      </i><i>   - empty -</i><i><br>
      </i><i>Warning message:</i><i><br>
      </i><i>In df2genind(data.frame(database), sep = "/", ncode = 3, p
        = NULL,  :</i><i><br>
      </i><i>  duplicate labels detected for some individuals; using
        generic labels</i><i><br>
      </i><i><br>
      </i><i>> grp<-find.clusters(x, max.n.clust=9)</i><i><br>
      </i><i>Choose the number PCs to retain (>=1): 140</i><i><br>
      </i><i>Choose the number of clusters (>=2): 6</i><i><br>
      </i><i>> dapc1<-dapc(x,grp$grp)</i><i><br>
      </i><i>Choose the number PCs to retain (>=1): 40</i><i><br>
      </i><i>Choose the number discriminant functions to retain
        (>=1): 5</i></small><br>
    <br>
    It works but, for using xvalDapc
    <div id="gt-res-content" class="almost_half_cell">
      <div dir="ltr" style="zoom:1"><span id="result_box" class=""
          lang="en"><span class="hps">I don't know</span> <span
            class="hps">what to choose</span> <span class="hps">as an
            argument</span> <span class="hps atn">for "</span><span
            class="atn">x" and "</span><span>grp</span><span>". I tried
            severals things but that didn't work. <br>
          </span></span><span id="result_box" class="" lang="en"><span><span
              id="result_box" class="short_text" lang="en"><span
                class="hps">Can</span> <span class="hps">you advise me</span>
              <span class="hps">on the arguments</span> <span
                class="hps">to use?<br>
                <br>
              </span></span></span></span><br>
        <span id="result_box" class="" lang="en"><span><span
              id="result_box" class="short_text" lang="en"><span
                class="hps"><span id="result_box" class="short_text"
                  lang="en"><span class="hps">Thank</span> <span
                    class="hps">you in advance for</span> <span
                    class="hps">your reply, <br>
                    <br>
                    Best regards, <br>
                    <br>
                    Maïlis<br>
                  </span></span><br>
              </span></span></span></span></div>
    </div>
  
<table style="border-top: 1px solid #aaabb6; margin-top: 30px;">
        <tr>
                <td style="width: 105px; padding-top: 15px;">
                        <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://ipmcdn.avast.com/images/logo-avast-v1.png" style="width: 90px; height:33px;"/></a>
                </td>
                <td style="width: 470px; padding-top: 20px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Cet e-mail a été envoyé depuis un ordinateur protégé par Avast. <br /><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: #4453ea;">www.avast.com</a>          </td>
        </tr>
</table>
</body>
</html>