<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Hi all, <div><br></div><div>i am having some real trouble with a very simple task: running hw.test from pegas which is supposed to work with adegenet. </div><div><br></div><div>i tried importing my files both from genepop and fstat using the read.genepop and read.fstat functions:</div><div><br></div><div>below an example code </div><div><br></div><div><div># load libraries</div><div><div>library(adegenet)</div><div>library(pegas)</div><div><br></div><div># import data</div><div>neu<-read.genepop("snp1.gen", ncode = 3L)</div><div><br></div><div># Calculate HWE for first pop</div><div>HWE_Ning<-hw.test(neu[1:23,], B=100)</div><div><br></div></div></div><div><br></div><div>at which point, i get warnings: </div><div><br></div><div>>There were 50 or more warnings (use warnings() to see the first 50)<br></div><div><div>> warnings()</div><div>Warning messages:</div><div>1: In O - E : longer object length is not a multiple of shorter object length</div><div>2: In (O - E)^2/E :</div><div>  longer object length is not a multiple of shorter object length</div><div>3: In O - E : longer object length is not a multiple of shorter object length</div><div>4: In (O - E)^2/E :</div><div>  longer object length is not a multiple of shorter object length</div><div>5: In O - E : longer object length is not a multiple of shorter object length</div><div>6: In (O - E)^2/E :</div><div>  longer object length is not a multiple of shorter object length</div><div>7: In O - E : longer object length is not a multiple of shorter object length</div><div><br></div></div><div>etc....<br><br>The hw.test function works just fine on the "nancycat" dataset from Adegenet . But it doesn't whenever i import a dataset. I know the datasets are not corrupted, as i have carried out a lot of other analyses in adegenet and  diveRsity and never had a problem... </div><div><br></div><div>This problem persists if i try to convert the genind object using the as.loci function before running hw.test. <br><br>Do you have any suggestion?</div><div><br></div><div><br></div><div>Thanks so much!</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Paolo</div></font></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br></div></blockquote></div></div></div>