jgx65/hierfstat

hierfstat::boot.ppfis function ‘+’ not meaningful for factors

dani-davenport opened this issue · 2 comments

heythere,

i have your basic genind obj, and calling either hierfstat::boot.ppfis() or hierfstat::basic.stats() results in this error here:
Error in 1:sum(data[, 1] == i) : NA/NaN argument
In addition: Warning message:
In Ops.factor(data[dim(data)[1], 1], 1) : ‘+’ not meaningful for factors

Please find attached a subset of my genind causing issues. I have taken a look and other functions appear to work fine with this data.

Regards,
D

Test_Genind.RData.zip

jgx65 commented

Should be fixed now (the command failed because all individuals belong to a single population and the population identifier is encoded as a factor):

basic.stats(test.gi)$overall   

Ho   Hs   Ht  Dst  Htp Dstp  Fst Fstp  Fis Dest   
1.0  0.5  0.5  0.0  NaN  NaN  0.0  NaN -1.0  NaN