This function is using a deprecated function from the HardyWeinberg package (HWExactMat). The package defaults to the new function (HWEXactStats) which returns a vector instead of a data frame causing the function to throw and error. Another issue is the way the allele frequencies are added to the HWE_df object in the function. The vector of allele 1 proportions is added to HWE_df by assigning it directly to a column; however, the two objects may not be in the same order. I noticed this in a plot when a population had only hets, but the allele frequency was 100% to one allele. This needs a hot fix soon.
This function is using a deprecated function from the HardyWeinberg package (HWExactMat). The package defaults to the new function (HWEXactStats) which returns a vector instead of a data frame causing the function to throw and error. Another issue is the way the allele frequencies are added to the HWE_df object in the function. The vector of allele 1 proportions is added to HWE_df by assigning it directly to a column; however, the two objects may not be in the same order. I noticed this in a plot when a population had only hets, but the allele frequency was 100% to one allele. This needs a hot fix soon.