Open pitakakariki opened 5 years ago
I had also run into this problem.
The easiest "fix" is just documentation, no?
And/or a warning when loading the package, much like the tidyverse
packages warn about shadowing. So when simr
is loaded second and shadows, include a start up message that "fixed
from stringr
is shadowed: you will need to call stringr::fixed
to manipulate strings." When simr
is loaded first, maybe "If you load the stringr
or tidyverse
packages, you will need to use simr::fixed
instead of fixed
for your power simulations".
And/or including a new name fixed_effect
or test_fixed
as an alias and optionally deprecating the old fixed
name but including it in the package.
Note the slightly different presentation when there's an S3 test
floating about: https://github.com/pitakakariki/simr/issues/167
Nb this hack should also issue a warning - we only want to avoid tidy verse stuff, not user specified functions.
Probably needs an ugly hack to fix, might be worth it since it's a very common package.