Open DrK-Lo opened 6 years ago
Hi @DrK-Lo,
This is a bug in pegas that will be fixed with the next release. You can see the issue here: https://github.com/emmanuelparadis/pegas/issues/36
The output gives a more informative warning when run with the new version, but not an error.
remotes::install_github('emmanuelparadis/pegas/pegas')
#> Downloading GitHub repo emmanuelparadis/pegas@master
#> Installing 2 packages: digest, spData
#> Installing packages into '/home/zkamvar/Documents/RLibrary'
#> (as 'lib' is unspecified)
#> Installing package into '/home/zkamvar/Documents/RLibrary'
#> (as 'lib' is unspecified)
library('pegas')
#> Loading required package: ape
#> Loading required package: adegenet
#> Loading required package: ade4
#>
#> /// adegenet 2.1.1 is loaded ////////////
#>
#> > overview: '?adegenet'
#> > tutorials/doc/questions: 'adegenetWeb()'
#> > bug reports/feature requests: adegenetIssues()
#>
#> Attaching package: 'pegas'
#> The following object is masked from 'package:ade4':
#>
#> amova
#> The following object is masked from 'package:ape':
#>
#> mst
data(nancycats)
hw.test(nancycats[pop = 17], B=0)
#> Warning in hw.test.loci(x = x, B = B, ...): The following locus was ignored: fca45
#> (not the same ploidy for all individuals, or too many missing data)
#> chi^2 df Pr(chi^2 >)
#> fca8 22.100000 15 0.1052085
#> fca23 10.631111 10 0.3869703
#> fca43 22.071111 10 0.0147464
#> fca45 NA NA NA
#> fca77 24.180000 21 0.2844190
#> fca78 1.764543 3 0.6226810
#> fca90 6.686359 6 0.3508286
#> fca96 0.312500 1 0.5761501
#> fca37 5.097337 3 0.1648068
Created on 2018-09-18 by the reprex package (v0.2.0).
Hi guys, This line of code is not working in your tutorial, but it worked for me last year (I use it in teaching)
(nanhwe.pop <- seppop(nancycats) %>% lapply(hw.test, B = 0))
I get the error message:
I traced the error to population 17:
So, removing the locus for that one population works. But I know the code worked for me last year, so suggestions welcome!