<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;"><br>
<div><br>
<div class="BodyFragment"><font size="2"><span style="font-size:10pt;">
<div class="PlainText">What does nrow(F1) and other nrow(...)'s say?<br>
<br>
<br>
<br>
<br>
</div>
</span></font></div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF298620"><font color="#000000" face="Tahoma" size="2"><b>From:</b> Spencer Bruce [goatsrunfaster@gmail.com]<br>
<b>Sent:</b> 23 October 2014 15:52<br>
<b>To:</b> Jombart, Thibaut<br>
<b>Cc:</b> adegenet-forum@lists.r-forge.r-project.org<br>
<b>Subject:</b> Re: [adegenet-forum] repooling random rows from genind objects<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">Error message:
<div><br>
</div>
<div>
<div>Error in <a href="http://sample.int" target="_blank">sample.int</a>(length(x), size, replace, prob) : </div>
<div>  invalid first argument</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Oct 23, 2014 at 10:50 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"><br>
<div><font>Hello, <br>
hard to figure out what is wrong without the error message..<br>
Cheers<br>
Thibaut<br>
</font></div>
<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> 23 October 2014 15:29<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] repooling random rows from genind objects<br>
</font><br>
</div>
<div>
<div class="h5">
<div></div>
<div>
<div dir="ltr">Hello All!
<div><br>
</div>
<div>I have three seperate populations as genind objects. What I would like to do is pull a certain number of random individuals from each, to form a new single genind population.</div>
<div><br>
</div>
<div>I would then like individuals from this new genind population to mate randomly, producing another genind object which would contain their offspring.</div>
<div><br>
</div>
<div>Below is the code I came up with (which does not work):</div>
<div><br>
</div>
<div>
<div>Year1 <- repool(F1[sample(nrow(F1), 500), ], pop1[sample(nrow(pop1), 750), ], pop2[sample(nrow(pop2), 750), ], n=2000)</div>
<div><br>
</div>
<div>Year2 <- hybridize(Year1[sample(nrow(Year1), 1000), ], Year1[sample(nrow(Year1), 1000), ], n=2000)</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>any help would be greatly appreciated!</div>
<div><br>
</div>
<div>Best,</div>
<div>Spencer</div>
<div><br>
</div>
<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>
Spencer A Bruce
<div>200 Washington St. </div>
<div>Troy, NY 12180<br>
518 225 0787</div>
</div>
</div>
</div>
</div>
</body>
</html>