buildIndex: Creating a search index for findPackage()

Description Usage Arguments Details Value Author(s) Examples

View source: R/packagefinder.r

Description

Builds a search index that can be used with findPackage().

Usage

1
buildIndex(filename = "", download.stats = FALSE)

Arguments

filename

Name of .rdata file to which the new index is saved.

download.stats

Indicates if the search index shall include download figures from the RStudio CRAN mirror logs.

Details

Functions like findPackage() or go() require a search index. This search index can either be created on-the-fly or be provided as a separate argument. In the latter case a search index can be built using buildIndex(). This index can include download figures for the packages (this feature is turned on with download.stats = TRUE). Including download stats requires significant time (may well be > 1 hour) for the index to be built. Therefore, when findPackage() is called without providing an index, the index that is created on-the-fly does not contain CRAN download figures.

Value

Returns the search index. As a side effect, the index is saved to a file, if a filename is provided via the filename argument.

Author(s)

Joachim Zuckarelli joachim@zuckarelli.de

Examples

1
 index <- buildIndex(filename = file.path(tempdir(), "searchindex.rdata"), download.stats = FALSE) 

packagefinder documentation built on Jan. 13, 2021, 1:02 p.m.