@ojala I’ve used tidyverse functionality a ton. Never ever use
library(tidyverse)
Only loading what you actually need is a habit everyone should form early and stick to. Get into efficient coding habits and you minimise the need (for yourself or others) to optimise and refactor later.
@ojala In my postgrad program, there's no discussion about this at all. People think #tidyverseis R.
Some package documentation seems to encourage careless use of resources too. If you use the recommended setup for #tensorflow in R, it will install and point to an entirely new python env with tensorflow - when you could just point it to the python and tensorflow env you've already got.
@ojala I can see a reasonable argument: you load it first, and then don't have to think about which packages you need while you focus on the problem (I find it disruptive – "oh the code doesn't run, I need to load something – is this in dplyr or tidyr or purrr...?").
But it'd be nice if there was an easy way to check afterwards which packages are actually needed, once the code is ready, and replace {tidyverse} with that minimal subset. (maybe this functionality already exists?)
Add comment