What is the help.search() function in R?
Overview
The help.search() function in R searches the help system.
This function searches for the help system for documentation matching. It does so for a given character string in the file name, title, alias, concept, and keywords entries.
Syntax
help.search(pattern, fields = c("alias", "concept", "title"),
apropos, keyword, whatis)
Parameter value
The help.search() function takes the following parameter values:
pattern: This represents a character string to be matched. If given, the following arguments are ignored:apropos,whatis, andkeyword.fields: This represents a character vector that specifies the help database’s field to be searched. The entries for this parameter must be abbreviations of"title","name","concept","keyword", and"alias"which correspond to the help pages’ name, title, topics, and concepts.apropos: This represents a character string to be matched in the help pages’ titles and topics.keyword: This represents a character string to be matched in the help pages’ `keywords’.what is: This represents a character string to be matched in the help pages’ topics.
Example
# implementing the help.search() functionhelp.search("print")help.search(apropos = "print")help.search(keyword = "hplot")help.search('linear models')
Explanation
- Line 3: We use the
help.search()function to return all the help pages with the titles or topics matching"print". - Line 4: Like in line 3, we use the
aproposargument of thehelp.search()function to return all the help pages with the titles or topics matching"print". - Line 5: We use the
keywordargument of thehelp.search()function to return all the help pages with the titles or topics matching"hplot". - Line 6: We use the
help.search()function to return all the help pages with the titles or topics matching"Linear models".