FBartos / zcurve

zcurve R package for assessing the reliability and trustworthiness of published literature with the z-curve method
https://fbartos.github.io/zcurve
10 stars 1 forks source link

Not explicitly labelling p-values as an argument #2

Closed limegreen closed 4 years ago

limegreen commented 4 years ago

This might be a "unique to me" issue, but it took me ages to resolve. I was inputting p-values rather than Z-scores, but was using lazy evaluation and writing zcurve([vector of p-values])

Wonder if a line at Line 71 or so to check that the max(z) is over 1 would help any other idiots. if(max(z) < 1 )stop("It looks like you are entering p-values rather than Z-scores? To use p-values, explicitly name your argument zcurve(p=[vector of p-values]")

FBartos commented 4 years ago

Hi, good idea. I just added the check and pushed the update. It won't be only on the GitHub version for now, since I don't wanna push a new version to CRAN just for this. Thanks, František

limegreen commented 4 years ago

Cheers. I'm embarrassed to say that I've tried using the package several times, and spent ages trying to look for a bug in your code, and it was just me missing the blindingly obvious!