Skip to content

Setting command line arguments for package installation #394

Open

Description

@kkmann

I opened this issue in {pak} before, but I think it is better addressed in {pkgdepends}. Here is the link to the original issue r-lib/pak#514.

I would like to test installed packages using tools::testInstalledPackage(), see https://rdrr.io/r/tools/testInstalledPackage.html.

In order to run all R code in the examples, tests, and vignettes, examples and tests need to be explicitly installed during installation. For examples this is the default, for tests not.

In order to do that, one would have to set R CMD INSTALL --install-tests as installation command line argument.

I am not sure how to set command line arguments in a package installation plan.

It seems that this might already be possible, see the cmd_args argument in make_build_process()

pkgdepends/R/install-plan.R

Lines 356 to 357 in 6741f04

make_build_process <- function(path, pkg, tmp_dir, lib, vignettes,
needscompilation, binary, cmd_args) {
but it is unlcear to me how to pass it from a package installation proposal since there is not configuation option matching the argument.

Activity

  1. added
    feature
    on May 7, 2025
  2. tzakharko commented on Jul 10, 2025

    @tzakharko

    +1 from me!

    I'd like to do a minimal instal with --no-data and friends, it would be great if pkgdepends and pak supported that. Maybe a global option (e.g. options(pkgdepends.install_opts = "--no-data")) would be the easiest way to go?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions