1. Using ?
?mean opens the help page for the mean function
?"+" opens the help page for addition
?"if" opens the help page for if, used for branching code
2. Using ??
To find functions, type two question marks (??) followed by a keyword related to the problem to search. Special characters, reserved words, and multiword search terms need enclosing in double or single quotes. for example:??plotting searches for topics containing words like "plotting"
??"regression model" searches for topics containing phrases like this
3. help and help.search
The functions help and help.search do the same things as ? and ??, respectively, but with these you always need to enclose your arguments in quotes. The following commands are equivalent to the previous examples:help("mean")help("+")
help("if")
help.search("plotting")
help.search("regression model")
4. example and demo functions
example(plot)
demo() #list all demonstrations
demo(Japanese)
5. vignettes
browseVignettes()
You can also access a specific vignette using the vignette function (but if your memory is as bad as mine, using browseVignettes combined with a page search is easier than trying to remember the name of a vignette and which package it’s in):
vignette("Sweave", package = "utils")
6. RSiteSearch
that you have installed on your machine. If you want to look in any package, you can use RSiteSearch, which runs a query at http://search.r-project.org. Multiword terms need to be wrapped in braces:
RSiteSearch("{Clustering}")