hierfstat::boot.ppfis function ‘+’ not meaningful for factors
dani-davenport opened this issue · 2 comments
dani-davenport commented
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
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
dani-davenport commented
Amazing. I don’t know how I didn’t realise that, thanks so much.
… On 25 Sep 2019, at 8:13 am, Jerome Goudet ***@***.***> wrote:
Should be fixed now (the command failed because all individuals 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
```
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#31?email_source=notifications&email_token=AFJS5VF2RHADERUX2AXY3CDQLKGILA5CNFSM4IZ352E2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7P7AIQ#issuecomment-534769698>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AFJS5VEW5DF5K2SLKVFA6ULQLKGILANCNFSM4IZ352EQ>.