CredibilityLab / groundhog

Reproducible R Scripts Via Date Controlled Installing & Loading of CRAN & Git Packages
https://groundhogr.com/
GNU General Public License v3.0
78 stars 4 forks source link

special installation for `conflicted` #97

Closed skolenik closed 1 year ago

skolenik commented 1 year ago

I have tried a mass update of a lot of stuff that involved

groundhog.library(c("tidyverse","conflicted"), date="whenever")

and sure enough after tidyverse tried to load after conflicted, the latter complained about dplyr::filter() vs. tools::filter(), breaking the process for reasons unrelated to groundhogr.

This may have to go rather deeply into the kind of exceptions you may have to raise. The patch (and perfectly good) solution is to groundhog.library("conflicted", date="whenever") the last among all the packages. Document it and declare a feature of the groundhogr operation rather than a tight corner :).

For a more robust and consolidated workflow, you may consider providing options like conflicted.preferences=list(conflicted_prefer_all="dplyr"), but it would not solve everything (I have dplyr::filter() vs tools::filter(), and I have haven::labelled() vs. labelled::labelled() that imports it vs. sjlabelled::labelled() that imports it, and I have summarytools::view() vs. tibble::view(). And then tidylog overwrites a good half of dplyr and tidyr stuff.)

urisohn commented 1 year ago

I am not a user of 'conflicted' , so need some background information. I did this: image and worked fine.

When do you run into troubles?