pak icon indicating copy to clipboard operation
pak copied to clipboard

[Feature Request] Easier bundling of packages

Open kbodwin opened this issue 4 years ago • 2 comments

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.

kbodwin avatar May 31 '21 15:05 kbodwin

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.

jimhester avatar Jun 01 '21 13:06 jimhester

I'll try if this works and then write a test case for it and document it.

gaborcsardi avatar Nov 26 '21 12:11 gaborcsardi