pitakakariki / simr

Power Analysis of Generalised Linear Mixed Models by Simulation
70 stars 20 forks source link

fixed clashes with stringr::fixed #147

Open pitakakariki opened 5 years ago

pitakakariki commented 5 years ago

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

palday commented 5 years ago

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.

pitakakariki commented 4 years ago

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

pitakakariki commented 3 years ago

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