<div dir="ltr">Hi there, <br><br>I'm guessing the previously lines of code didn't look exaaactly the same... You're missing a closing curved bracket on the right end of sample. Should be: <br><br><span style="font-family:arial,sans-serif;font-size:12.8000001907349px">randomF12Gen15 <- randomF12Gen14[sample(nrow(</span><span style="font-family:arial,sans-serif"><span style="font-size:12.8000001907349px">randomF12Gen14$tab), 199 </span><font color="#ff0000"><b><font size="4">)</font><span style="font-size:12.8000001907349px"> </span></b></font><span style="font-size:12.8000001907349px">, ]<br></span></span><br>See if that works now?<br><br>Best, <br>Caitlin. </div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 7, 2014 at 2:47 PM, Spencer Bruce <span dir="ltr"><<a href="mailto:goatsrunfaster@gmail.com" target="_blank">goatsrunfaster@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello All,<div><br></div><div>I'm work with a large set of data where I need to continuously randomly sample individuals, and keep getting random error messages, seemingly for no reason. Example below:</div><div><br></div><div><div>> randomF12Gen15 <- randomF12Gen14[sample(nrow(randomF12Gen14$tab), 199, ]</div><div><br></div><div>Error: unexpected ']' in "randomF12Gen15 <- randomF12Gen14[sample(nrow(randomF12Gen14$tab), 199, ]"</div><div><br></div><div>This does not make sense given that I ran multiple lines of code before it that look exactly the same.</div><div><br></div><div>Any idea why this might be happening?</div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div><div dir="ltr">Spencer A Bruce<div>113 Hill St. </div><div>Troy, NY 12180<br><a href="tel:518%20225%200787" value="+15182250787" target="_blank">518 225 0787</a></div></div></div>
</font></span></div></div>
<br>_______________________________________________<br>
adegenet-forum mailing list<br>
<a href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum</a><br></blockquote></div><br></div>