<div dir="ltr">Got it, thanks.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 4, 2014 at 7:20 AM, Jombart, Thibaut <span dir="ltr"><<a href="mailto:t.jombart@imperial.ac.uk" target="_blank">t.jombart@imperial.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Hi Spencer,
<br>
<br>
you don't need to convert genind to data.frames - just subset individuals in the genind objects like you would in a matrix. Then, you can pool datasets with potentially different alleles using 'repool'.<br>
<br>
Cheers<br>
Thibaut<br>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma"><b>From:</b> <a href="mailto:adegenet-forum-bounces@lists.r-forge.r-project.org" target="_blank">adegenet-forum-bounces@lists.r-forge.r-project.org</a> [<a href="mailto:adegenet-forum-bounces@lists.r-forge.r-project.org" target="_blank">adegenet-forum-bounces@lists.r-forge.r-project.org</a>] on behalf of Spencer Bruce [<a href="mailto:goatsrunfaster@gmail.com" target="_blank">goatsrunfaster@gmail.com</a>]<br>
<b>Sent:</b> 27 October 2014 13:57<br>
<b>To:</b> <a href="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank">adegenet-forum@lists.r-forge.r-project.org</a><br>
<b>Subject:</b> [adegenet-forum] Hybridize Function / df2genind error message<br>
</font><br>
</div><div><div class="h5">
<div></div>
<div>
<div dir="ltr">Hello All,
<div><br>
</div>
<div>After hybridizing two populations, I converted the genind file to at dataframe to randomly extract individuals. I then attempt to convert this data frame back into a genind file, but get the error message below:</div>
<div><br>
</div>
<div>
<div>> F1_G1 <- df2genind(randomF1)</div>
<div>Error in df2genind(randomF1) : </div>
<div>  2 alleles cannot be coded by a total of 19 characters</div>
<div><br>
</div>
<div>Im assuming this is because the "pop" column, instead of being coded by a number contains the text generated by the hybridize function "honnedaga-tdhybrids"</div>
<div><br>
</div>
<div>I tried to resolve this by using the following code, but ran into a second error message:</div>
<div><br>
</div>
<div>
<div>> randomF1$pop[randomF1$pop == "honnedaga-tdhybrids"] <- 1</div>
<div>Warning message:</div>
<div>In `[<-.factor`(`*tmp*`, randomF1$pop == "honnedaga-tdhybrids",  :</div>
<div>  invalid factor level, NA generated</div>
</div>
<div><br>
</div>
<div>any idea how I might be able to fix this? Thanks in advance!!!</div>
<div><br>
</div>
<div>-Spencer</div>
<div><br>
</div>
-- <br>
Spencer A Bruce
<div>200 Washington St. </div>
<div>Troy, NY 12180<br>
<a href="tel:518%20225%200787" value="+15182250787" target="_blank">518 225 0787</a></div>
</div>
</div>
</div>
</div></div></div>
</div>
</div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Spencer A Bruce<div>113 Hill St. </div><div>Troy, NY 12180<br>518 225 0787</div></div></div>
</div>