bspm icon indicating copy to clipboard operation
bspm copied to clipboard

Manage 'available_packages_filters' option

Open Enchufa2 opened this issue 3 years ago • 0 comments

From help(available.packages):

     Argument ‘filters’ can be used to select which of the packages on
     the repositories are reported.  It is called with its default
     value (‘NULL’) by functions such as ‘install.packages’: this value
     corresponds to ‘getOption("available_packages_filters")’ and to
     ‘c("R_version", "OS_type", "subarch", "duplicates")’ if that is
     unset or set to ‘NULL’.

     The built-in filters are

     ‘"R_version"’ Exclude packages whose R version requirements are
          not met.

     ‘"OS_type"’ Exclude packages whose OS requirement is incompatible
          with this version of R: that is exclude Windows-only packages
          on a Unix-alike platform and _vice versa_.

     ‘"subarch"’ For binary packages, exclude those with compiled code
          that is not available for the current sub-architecture, e.g.
          exclude packages only compiled for 32-bit Windows on a 64-bit
          Windows R.

     ‘"duplicates"’ Only report the latest version where more than one
          version is available, and only report the first-named
          repository (in ‘contriburl’) with the latest version if that
          is in more than one repository.

     ‘"license/FOSS"’ Include only packages for which installation can
          proceed solely based on packages which can be verified as
          Free or Open Source Software (FOSS, e.g., <URL:
          https://en.wikipedia.org/wiki/FOSS>) employing the available
          license specifications.  Thus both the package and any
          packages that it depends on to load need to be _known to be_
          FOSS.

          Note that this does depend on the repository supplying
          license information.

     ‘"license/restricts_use"’ Include only packages for which
          installation can proceed solely based on packages which are
          known not to restrict use.

     ‘"CRAN"’ Use CRAN versions in preference to versions from other
          repositories (even if these have a higher version number).
          This needs to be applied _before_ the default ‘"duplicates"’
          filter, so cannot be used with ‘add = TRUE’.

     If all the filters are from this set, then they can be specified
     as a character vector; otherwise ‘filters’ should be a list with
     elements which are character strings, user-defined functions or
     ‘add = TRUE’ (see below).

     User-defined filters are functions which take a single argument, a
     matrix of the form returned by ‘available.packages’, and return a
     matrix consisting of a subset of the rows of the argument.

     The special ‘filter’ ‘add = TRUE’ appends the other elements of
     the filter list to the default filters.

Enchufa2 avatar Aug 06 '21 14:08 Enchufa2