pruneRepo: Prune repository from older copies of packages

Description Usage Arguments Details Value Author(s)

View source: R/pruneRepo.R

Description

The function determines which packages in a repositories can be removed as they are being ‘shadowed’ by a newer version of the same packages.

Usage

1
2
pruneRepo(repopath = getOption("dratRepo", "~/git/drat"), type = "source",
  pkg, remove = FALSE)

Arguments

repopath

Character variable with the path to the repo; defaults to the value of the “dratRepo” option with “"~/git/drat"” as fallback

type

Character variable for the type of repository, so far “source”

pkg

Optional character variable specifying a package name, whose older versions should be pruned. If missing (the default), pruning is performed on all packages.

remove

Logical variable indicating whether files should be removed

Details

Given a package name, R will always find the newest version of that package. Older versions are therefore effectively shadowed and can be removed without functionally changing a repository.

This function is still undergoing development and polish and may change in subsequent versions.

Value

A data frame describing the repository is returned containing columns with columns “file”, “package” (just the name), “version” and a logical variable “newest” indicating if the package can be removed.

Author(s)

Dirk Eddelbuettel


drat documentation built on Dec. 17, 2017, 9:10 a.m.