<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<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><font size="2">Hi there, <br>
<br>
I am not sure which version of adegenet you are using, but it would be worth updating everything just to make sure.
<br>
<br>
@ind.names disappeared in adegenet 2.0.0, alongside other slots that were no longer useful. See ChangeLog for more info:<br>
<a href="https://github.com/thibautjombart/adegenet/blob/master/ChangeLog" target="_blank">https://github.com/thibautjombart/adegenet/blob/master/ChangeLog</a><br>
<br>
You basically want to use accessors instead, e.g. indNames(dataset.gen) etc.<br>
<br>
They are all documented in the new 'basics' tutorial.<br>
<br>
Best<br>
Thibaut<br>
</font>
<div style="font-family:Tahoma; font-size:13px">
<div class="BodyFragment"><font size="2"><span style="font-size:10pt">
<div class="PlainText"><br>
</div>
</span></font></div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF428102"><font face="Tahoma" color="#000000" size="2"><b>From:</b> adegenet-forum-bounces@lists.r-forge.r-project.org [adegenet-forum-bounces@lists.r-forge.r-project.org] on behalf of Stephen Attwood [swahuaxi@yahoo.com]<br>
<b>Sent:</b> 07 September 2015 14:32<br>
<b>To:</b> adegenet-forum@lists.r-forge.r-project.org<br>
<b>Subject:</b> [adegenet-forum] df2genind ignoring ind.names<br>
</font><br>
</div>
<div></div>
<div>
<div style="color:#000; background-color:#fff; font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size:16px">
<div id="yiv1793208795">
<div id="yui_3_16_0_1_1441629120827_19393">
<div id="yui_3_16_0_1_1441629120827_19392" style="color:#000; background-color:#fff; font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size:16px">
<div id="yiv1793208795yui_3_16_0_1_1441629120827_12538"><span id="yiv1793208795yui_3_16_0_1_1441629120827_12537">Apologies for bothering you all, but I suddenly started getting this error (the script below used to work ok on same dataset and I reinstalled with
latest package adegenet after problem appeared but error persisted):</span></div>
<div id="yiv1793208795yui_3_16_0_1_1441629120827_12670"><br>
</div>
<div id="yiv1793208795yui_3_16_0_1_1441629120827_13024">R<br>
<span id="yiv1793208795yui_3_16_0_1_1441629120827_12537"></span></div>
<div dir="ltr" id="yiv1793208795yui_3_16_0_1_1441629120827_12669"><span id="yiv1793208795yui_3_16_0_1_1441629120827_12537">library(PopGenReport)<br class="yiv1793208795" id="yiv1793208795yui_3_16_0_1_1441629120827_12704">
dataset.df <- read.csv("/home/.../dataset.csv",head = FALSE, sep = ",")</span></div>
<div id="yiv1793208795yui_3_16_0_1_1441629120827_12784" dir="ltr"><span id="yiv1793208795yui_3_16_0_1_1441629120827_12537"><br>
</span></div>
<div id="yiv1793208795yui_3_16_0_1_1441629120827_12706" dir="ltr"><span id="yiv1793208795yui_3_16_0_1_1441629120827_12537">dataset.gen <- df2genind(dataset.df[, -c(1, 2)], ind.names = dataset.df[[1]], pop = dataset.df[[2]], loc.names = c("locusA","locusB","locusC","locusD","locusE","locusF","locusG","locusH","locusJ"),
type = "codom", ploidy = 2, sep="/")</span></div>
<div id="yiv1793208795yui_3_16_0_1_1441629120827_12787" dir="ltr"><br>
<span id="yiv1793208795yui_3_16_0_1_1441629120827_12537"></span></div>
<div id="yiv1793208795yui_3_16_0_1_1441629120827_12847" dir="ltr"><span id="yiv1793208795yui_3_16_0_1_1441629120827_12537">dataset.gen@ind.names # returns "Error: no slot of name "ind.names" for this object of class "genind""</span></div>
<div id="yiv1793208795yui_3_16_0_1_1441629120827_12861" dir="ltr"><br>
<span id="yiv1793208795yui_3_16_0_1_1441629120827_12537"></span></div>
<div id="yiv1793208795yui_3_16_0_1_1441629120827_12913" dir="ltr"><span id="yiv1793208795yui_3_16_0_1_1441629120827_12537">dataset.gen@pop # returns the populations correctly</span><br>
<span class="yiv1793208795" id="yiv1793208795yui_3_16_0_1_1441629120827_12537">dataset.gen@tab # returns the genotypes correctly</span></div>
<div id="yiv1793208795yui_3_16_0_1_1441629120827_12917" dir="ltr"><br>
</div>
<div id="yiv1793208795yui_3_16_0_1_1441629120827_12954" dir="ltr">dataset.df[[1]] # returns the ind.names correctly<br>
<span class="yiv1793208795" id="yiv1793208795yui_3_16_0_1_1441629120827_12537"></span></div>
<div id="yiv1793208795yui_3_16_0_1_1441629120827_12946" dir="ltr"><span class="yiv1793208795" id="yiv1793208795yui_3_16_0_1_1441629120827_12537"><br>
</span></div>
<div id="yiv1793208795yui_3_16_0_1_1441629120827_12741" dir="ltr">
<div id="yui_3_16_0_1_1441629120827_19463"><span id="yiv1793208795yui_3_16_0_1_1441629120827_12537">Can anyone advise as to how to fix the above code so that the ind.names are correctly slotted into the genind object?</span></div>
<div id="yui_3_16_0_1_1441629120827_19501"><br>
<span id="yiv1793208795yui_3_16_0_1_1441629120827_12537"></span></div>
<div id="yui_3_16_0_1_1441629120827_19503"><span id="yiv1793208795yui_3_16_0_1_1441629120827_12537">I run R on linux Mint.<br>
</span></div>
</div>
<div id="yiv1793208795yui_3_16_0_1_1441629120827_13130" dir="ltr"><br>
<span id="yiv1793208795yui_3_16_0_1_1441629120827_12537"></span></div>
<div id="yiv1793208795yui_3_16_0_1_1441629120827_13129" dir="ltr">
<div id="yui_3_16_0_1_1441629120827_19590"><span id="yiv1793208795yui_3_16_0_1_1441629120827_12537">I also noticed that PopGenReport began to return the error "could not find function "pairwise.fst"" in computation of Nei’s pairwise Fst, and that this error
began to appear from the same time as above. Are both these problems likely to be due to changes in adegenet?</span></div>
<div id="yui_3_16_0_1_1441629120827_19598"><br>
<span id="yiv1793208795yui_3_16_0_1_1441629120827_12537"></span></div>
<div id="yui_3_16_0_1_1441629120827_19596"><span id="yiv1793208795yui_3_16_0_1_1441629120827_12537">These are great tools by the way - I use them often.<br>
</span></div>
</div>
<div id="yiv1793208795yui_3_16_0_1_1441629120827_13320" dir="ltr"><br>
<span id="yiv1793208795yui_3_16_0_1_1441629120827_12537"></span></div>
<div id="yiv1793208795yui_3_16_0_1_1441629120827_13321" dir="ltr"><span id="yiv1793208795yui_3_16_0_1_1441629120827_12537">Thank you.</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>