adegenet icon indicating copy to clipboard operation
adegenet copied to clipboard

Error in fstat(b, fstonly = T) : could not find function "fstat"

Open nicolashazzi23 opened this issue 1 year ago • 3 comments

Hi

I am trying to run an fst analysis and I got the following error: Error in fstat(b, fstonly = T) : could not find function "fstat".

I installed the package hierfstat and loaded it, but it still did not work. Do you have some idea of what could be happening?

nicolashazzi23 avatar Dec 27 '23 23:12 nicolashazzi23

Have you restarted your R session after installing the package? What versions of packages are you using (sessionInfo())?

romunov avatar Jan 01 '24 18:01 romunov

If you installed hierfstat, the simplest way to get Fst is via the command hierfstat::wc(dat) where dat is a genind object. This will give you the Weir and Cockerham (1984) estimate of FST. An alternative is using hierfstat::basic.stats(dat) which will provide more detailed information as well as Nei's estimator of FST

jgx65 avatar Jan 02 '24 17:01 jgx65

Thanks I did it and now works perfectly, thank you very much!

nicolashazzi23 avatar Jan 02 '24 18:01 nicolashazzi23