simr
simr copied to clipboard
fixed clashes with stringr::fixed
Probably needs an ugly hack to fix, might be worth it since it's a very common package.
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 whensimr
is loaded second and shadows, include a start up message that "fixed
fromstringr
is shadowed: you will need to callstringr::fixed
to manipulate strings." Whensimr
is loaded first, maybe "If you load thestringr
ortidyverse
packages, you will need to usesimr::fixed
instead offixed
for your power simulations". -
And/or including a new name
fixed_effect
ortest_fixed
as an alias and optionally deprecating the oldfixed
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.