Help Search Utilities
Utilities for searching the help system.
hsearch_db(package = NULL, lib.loc = NULL, types = getOption("help.search.types"), verbose = getOption("verbose"), rebuild = FALSE, use_UTF8 = FALSE) hsearch_db_concepts(db = hsearch_db()) hsearch_db_keywords(db = hsearch_db())
- a character vector with the names of packages to
search through, or
NULLin which case all available packages in the library trees specified by
- a character vector describing the location of Rlibrary trees to search through, or
NULL. The default value of
NULLcorresponds to all libraries currently known.
- a character vector listing the types of documentation
- a logical controlling the verbosity of building the
help search database.
- a logical indicating whether the help search database
should be rebuilt.
- logical: should results be given in UTF-8 encoding?
- a help search database as obtained by calls to
hsearch_db() builds and caches the help search database for
subsequent use by
help.search. (In fact, re-builds only
when forced (
rebuild = TRUE) or
The format of the help search database is still experimental, and may change in future versions. Currently, it consists of four tables: one with base information about all documentation objects found, including their names and titles and unique ids; three more tables contain the individual aliases, concepts and keywords together with the ids of the documentation objects they belong to. Separating out the latter three tables accounts for the fact that a single documentation object may provide several of these entries, and allows for efficient searching.
See the details in
help.search for how searchable
entries are interpreted according to help type.
all concepts or keywords, respectively, from a help search database,
and return these in a data frame together with their total frequencies
and the numbers of packages they are used in, with entries sorted in
decreasing total frequency.
db <- hsearch_db() ## Total numbers of documentation objects, aliases, keywords and ## concepts (using the current format): sapply(db, NROW) ## Can also be obtained from print method: db ## 10 most frequent concepts: head(hsearch_db_concepts(), 10) ## 10 most frequent keywords: head(hsearch_db_keywords(), 10)