<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thanks for your reply, Thibaut.<div><br></div><div>But how do I do this if I have a separate text file of population names corresponding to the individuals listed in the FASTA file? I can load the file of population names using read.table, but then I'm not sure how to use the pop argument from there.</div><div><br></div><div>When I tried:</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(0, 52, 255); "><span style="color: #942193">> </span>x <-("~/path/file.txt")</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(0, 52, 255); "><span style="color: #942193">> </span>pop(x)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(0, 52, 255); "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica" size="3">I get: </font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica" size="3"><br></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(255, 38, 0); ">Error in function (classes, fdef, mtable) : </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(255, 38, 0); "> unable to find an inherited method for function "pop", for signature "character"</div></div><div><br></div><div>Sorry, just learning R . . .</div><div><br></div><div><div><br><div><div>On Aug 24, 2012, at 8:54 AM, Jombart, Thibaut wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hello, <br><br>you need to use 'pop(x) <- ...' to change or set population information; for instance, using simulated data:<br><br><blockquote type="cite">x <- glSim(10,100)<br></blockquote><blockquote type="cite">pop(x)<br></blockquote> [1] A A A A A B B B B B<br>Levels: A B<br><blockquote type="cite">pop(x) <- rep(1:2, c(2,8))<br></blockquote><blockquote type="cite">pop(x)<br></blockquote> [1] 1 1 2 2 2 2 2 2 2 2<br>Levels: 1 2<br><br>Cheers<br><br>Thibaut<br><br><br>________________________________________<br>From: <a href="mailto:adegenet-forum-bounces@lists.r-forge.r-project.org">adegenet-forum-bounces@lists.r-forge.r-project.org</a> [adegenet-forum-bounces@lists.r-forge.r-project.org] on behalf of Tom Devitt [tommydevitt@gmail.com]<br>Sent: 24 August 2012 13:25<br>To: <a href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge.r-project.org</a><br>Subject: [adegenet-forum] pop argument<br><br>Could someone please help me understand how to include population information using the pop argument for a genlight object? I've used the read.DNA argument to input my data (FASTA format) and then the fasta2genlight argument to extract SNPs. I don't know how to specify individual population assignments using the pop argument. Thanks for your help.<br><br>(Sorry if this is a repost - I tried sending this message a couple days ago, but am not sure it posted to the forum.)<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>https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum<br></div></blockquote></div><br></div></div></body></html>