dreamRs / prefixer

Prefix function with their namespace & other development tools
GNU General Public License v3.0
142 stars 5 forks source link

Replace `tidyverse::` with package name #2

Open gshotwell opened 6 years ago

gshotwell commented 6 years ago

There was a recent post which warned people not to use the tidyverse package in package development, and I thought this might be a good opportunity to use a package to change tidyverse prefixes to the more limited package prefix. So the user could write:

mtcars %>%
    tidyverse::mutate(n = n()) %>%
    tidyverse::gather(...)

And get after running the script their code would change to:

mtcars %>%
    dplyr::mutate(n = n()) %>%
    tidyr::gather(...)

Anyway I just found out about this awesome package and thought this idea would fit well here, does it seem like a useful idea?

pvictor commented 6 years ago

You're absolutely right, but tidyverse::mutate isn't a function, so prefixer won't propose to prefix mutate with tidyverse only with dplyr :)

Victor