Skip to content

Set available_package_filters option before calling pkgAvail() directly/indirectly #135

Description

@hturner

miniCRAN::pkgAvail() calls utils::available.packages() with filters = NULL by default. As documented in ?available.packages, this corresponds to a default set of filters: c("R_version", "OS_type", "subarch", "duplicates"), which means that it excludes packages whose OS requirement is incompatible with the current OS and excludes those with compiled code that is not available for the current sub-architecture.

In other words, running offlinedatasci install r-packages tmp on Windows excludes packages that are compiled for macOS, which is quite a lot!

Unfortunately miniCRAN::makeRepo calls pkgAvail() without setting any filters argument, so the only way to control this at the moment is to set the available_packages_filters option. I think you want:

options(available_packages_filters = "duplicates")

Also dropping "R_version" as this is already handled by setting the URL and potentially someone could try setting up a miniCRAN for R 4.4 (say) when their current version of R is a different version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions