pak
pak copied to clipboard
[Feature Request] Easier bundling of packages
This is a niche feature I've always wanted. It might not fit with the goals of pak, but worth a try.
I often want to have students in a class/workshop install a bunch of prep packages, and use them in various projects. It'd be cool to have a shortcut for bundling, like
pak::install_bundle("kbodwin/Stat_331")
library(Stat_331)
It's not super different from listing packages individually, but it'd be convenient to update and cleaner in the RMarkdown chunk.
Obviously I could achieve this by making a skeleton -verse package, putting it on GitHub, and having the students install it. I'm just lazy and want an easy shortcut for that process.
A way to do this which is already supported is to put a minimal DESCRIPTION file in the root
directory of kbodwin/Stat_331 and list all the packages you want them to install there.
The only fields you need is the Package, a Version and the Depends
e.g.
Package: Stat331
Version: 1.0.0
Depends:
tidyverse,
tidymodels
Then have them run pak::pak("kbodwin/Stat_331") and it will install all the packages you want them to have available.
I'll try if this works and then write a test case for it and document it.