This might be a terrible idea, but I like loading packages without a bunch of a require
statements — or needing to explicitly install a package if I haven't already done so. I have this function in my .Rprofile
, so the top of my R files look like this:
pkgs <- c(
"tidyverse",
"Hmisc",
... etc.
)
smartRequire(pkgs)