Learn R Programming

packagefinder (version 0.3.5)

buildIndex: Creating a search index for findPackage()

Description

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

Usage

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

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.

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.

Author

Joachim Zuckarelli joachim@zuckarelli.de

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.

Examples

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

Run the code above in your browser using DataLab