Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg_deps() should handle multiple packages #631

Open
jameslairdsmith opened this issue May 13, 2024 · 1 comment
Open

pkg_deps() should handle multiple packages #631

jameslairdsmith opened this issue May 13, 2024 · 1 comment

Comments

@jameslairdsmith
Copy link

pak/R/package.R

Line 211 in d791187

stopifnot(length(pkg) == 1 && is.character(pkg))

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.

@gaborcsardi
Copy link
Member

Would you like to submit a PR? (No pressure, really :))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants