simr icon indicating copy to clipboard operation
simr copied to clipboard

fixed clashes with stringr::fixed

Open pitakakariki opened this issue 6 years ago • 3 comments

Probably needs an ugly hack to fix, might be worth it since it's a very common package.

pitakakariki avatar Jan 29 '19 02:01 pitakakariki

I had also run into this problem.

  1. The easiest "fix" is just documentation, no?

  2. 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".

  3. 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.

palday avatar Feb 18 '19 10:02 palday

Note the slightly different presentation when there's an S3 test floating about: https://github.com/pitakakariki/simr/issues/167

pitakakariki avatar Oct 25 '19 00:10 pitakakariki

Nb this hack should also issue a warning - we only want to avoid tidy verse stuff, not user specified functions.

pitakakariki avatar Jun 26 '21 00:06 pitakakariki