strengejacke / esc

Effect Size Computation for Meta Analysis
https://strengejacke.github.io/esc
20 stars 6 forks source link

Warn/fail if multiple parameters are passed to esc:::convert_to_d? #13

Open LukasWallrich opened 6 months ago

LukasWallrich commented 6 months ago

Thanks for this handy package! I was trying to use it programmatically, and constructed a call to convert multiple effect size types at once - which then results in unexpected / unpredictable output. There is probably no meaningful way to do this in one call, but then an error would be great.

library(esc)
pearsons_r(d = 1)
#> [1] 0.4472136
# Multiple arguments result in least expected behaviour - 
# where later arguments override earlier ones.
pearsons_r(d = 1, or = 2)
#> [1] 0.1876806

Created on 2024-02-14 with reprex v2.0.2