Closed JoulesOLVERA closed 7 months ago
try adding na.rm=TRUE
after FUN=mean
. Note there exists hierfstat::Ho
and hierfstat::Hs
, e.g.:
library(hierfstat)
data(gtrunchier)
basic.stats(gtrunchier[,-2])
Ho(gtrunchier[,-2])
Hs(gtrunchier[,-2])
Hi Jerome !! It worked !! Thanks à lot :D I also tried the functions hierfstat::Ho and hierfstat::Hs and gave me the same results.
Have a nice week continuation, Joules
Hi Jerome !!
I have computed some genetic estimates among populations but I do not know why I get NaN in many of them (e.g. Fis, Ho, He) and I am wondering if it is a small sample issue (populations numbers range from 1 to 17 !). I paste part of the commands that I have used with the outcomes:
// 104 individuals; 871 loci; 1,742 alleles; size: 1.2 Mb
// Basic content @tab: 104 x 1742 matrix of allele counts @loc.n.all: number of alleles per locus (range: 2-2) @loc.fac: locus factor for the 1742 columns of @tab @all.names: list of allele names for each locus @ploidy: ploidy of each individual (range: 2-2) @type: codom @call: adegenet::df2genind(X = t(x), sep = sep)
// Optional content @pop: population of each individual (group size range: 1-17)
library(hierfstat) basic_Afirma = hierfstat::basic.stats(Afirma, diploid = TRUE)
Do you think there is something wrong with my data ? I do not know why it is not possible to do some calculations even for populations with n > 5 :( Also I wanted to ask if it is possible to estimate Fst values among pairs of populations and not only a mean value for all the data.
Cheers, Joules