pak icon indicating copy to clipboard operation
pak copied to clipboard

`pkg_deps()` should handle multiple packages

Open jameslairdsmith opened this issue 9 months ago • 1 comments

https://github.com/r-lib/pak/blob/d791187ade9d9c2eb2f47adb685a37b5b6e3fe3e/R/package.R#L211

There might be a reason for this, but was expecting something like pkg_deps(c("tidyverse", "tidymodels")) to work?

library(pak)

pkg_deps(c("tidyverse", "tidymodels"))
#> Error in pkg_deps(c("tidyverse", "tidymodels")): length(pkg) == 1 && is.character(pkg) is not TRUE

Created on 2024-05-13 with reprex v2.1.0

It's not a big problem, as one can get the desired output from pkgdepends:

library(pkgdepends)

my_deps <- new_pkg_deps(c("tidyverse", "tidymodels"))
my_deps$solve()
my_deps$get_solution()$data

But I figure most people are likely to try find it in pak first.

jameslairdsmith avatar May 13 '24 09:05 jameslairdsmith