@datamaps @smach @MichaelIngrisch @rstats
I am afraid the problem is deeper: why would you load any package when a one-liner equivalent is available in Rbase? The list of dependencies some people use is frightening. I am not sure to understand how this bad programming culture appeared in the R community, but this has to be fixed. R could be a solid base for reproducible science only if users stop to load dozens of packages for trivial tasks.
@arnaudlerouzic @datamaps @smach @MichaelIngrisch @rstats
I think we're conflating two problems here.
Using base R does not ensure reproducibility, just like using tidyverse won't make a script less reproducible. For reproducibility, use renv, or similar solutions.
Loading tidyverse is a convenient way to have access to lots of functions without having to remember which package they come from. I like to be lazy like that of I'm just testing something... but will probably include single packages for a more important script (eg for a publication or a package)
@arinbasu1 @nicolaromano @rstats It is true that using base R has a higher likelihood of reproducibility in the near term than the tidyverse suite. However, there is still a chance that a change in R causes breaking changes (e.g. R 4.0 with the `stringsAsFactors` default switch). What Nicola's point is that it's better to avoid that situation altogether with renv, which generates a lockfile and restores pkg versions using MRAN, taking care of random breaking changes
Absolutely, what @Patrick Anker says.
Also, I think most problems of reproducibility (at least, those I encountered) are not dependent on package versions. The script might be incomplete, or the data to be fed to the script needs to be processed somehow and there are no clear instructions of how to do it etc.
These are much more common issues, at least in my field.
@arinbasu1 @smach @rstats @arnaudlerouzic @datamaps @MichaelIngrisch @nicolaromano I guess some users see in #tidyverse a simpler option to share code, giving that it has verbs closer to human language. But, I'm with you on this. I still use a lot of base R functions. For teaching, I've found tidyverse more useful because students see it easier to follow.
@arinbasu1 @smach @rstats @arnaudlerouzic @datamaps @nicolaromano @estebanmonte
absolutely, I fully agree. Very teachable, consistent function calls, awesome for database-like operations and unbeatable for plotting. For me, tidyverse gets really complicated as soon as I need tidy evaluation, though.
@MichaelIngrisch @arinbasu1 Tidy evaluation is one of my biggest use cases for data.table! That and performance (I try to use data.table whenever I can in my Shiny apps, for example.)
"Using base R does not ensure reproducibility",
What did you mean? After all you'll still need base R to run tidyverse, isn't it?
In comparison to tidyverse, both base R and pardon me, `data.table` have fewer dependency issues. One reason I am scared of any new package installation in R is the thought of struggling through dependency.