<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hello, </div><div><br></div><div>I want to subset part of the individuals of my genlight object according to a variable stored in the @other slot. I get an error I don't understand.</div><div>I stored 3 categorical variables in the @other slot. It looks like that: </div><div><div><b>> str(other(<a href="http://asocial.gl">asocial.gl</a>))</b></div><div>List of 3</div><div> $ basin : Factor w/ 3 levels "Rhine","Rhone_Valais",..: NA 2 NA 2 2 2 2 2 2 2 ...</div><div> $ Sgeno : Factor w/ 3 levels "mm","mp","pp": 1 2 3 1 1 1 1 1 1 1 ...</div><div> $ Spheno: Factor w/ 2 levels "M","P": 1 2 2 1 1 1 1 1 1 1 ...</div></div><div><br></div><div>When I try to subset my dataset, I get this error:</div><div><div><b>> <a href="http://asocial.gl">asocial.gl</a>[asocial.gl@other$basin=="Rhone_Valais",]</b></div><div>Error in .local(x, i, j, ..., drop = drop) : </div><div>  trying to get slot "n.loc" from an object of a basic class ("NULL") with no slots</div></div><div><br></div><div>The condition seems to work well, since when I call it alone, it outputs a list of TRUE, FALSE that corresponds well to the individuals I want to keep. </div><div><div><b>> asocial.gl@other$basin=="Rhone_Valais"</b></div><div>  [1]    NA FALSE    NA FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE  TRUE  TRUE</div><div> [15]  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE</div><div> ...</div></div><div><br></div><div>I use the same subseting command to select according to the @pop slot and it works well. </div><br></div><div dir="ltr"><br></div><div dir="ltr">Any help will be appreciated, </div><div dir="ltr"><br></div><div dir="ltr">Thanks a lot in advance, </div><div dir="ltr"><br></div><div dir="ltr">Amaranta.<br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>----------------------------------------------------------</div>Amaranta Fontcuberta, assistante diplômée<div>Dept. Écologie et Évolution</div><div>Université de Lausanne</div></div></div></div><div dir="ltr"><br></div></div></div></div></div>