jgx65 / hierfstat

the hierfstat package
24 stars 14 forks source link

allelic.richness does not work for single-locus datasets #25

Closed nikostourvas closed 5 years ago

nikostourvas commented 6 years ago

When trying to calculate allelic richness for datasets with only one locus I get the following error: Error in apply(data[, -1], 2, dum) : dim(X) must have a positive length

No error is given for datasets with two or more loci. I have tried both the version of hierfstat currently available on cran and the development version from github. To my understanding this is identical to closed bug #7 for basic.stats opened on Sep 18, 2015, so hopefully this should be an easy fix.

jgx65 commented 5 years ago

fixed (commit bf33c2b1e5ffedd29fabfeb51173882616d271e7)