Getting help in R Language

R Language has a very useful and advanced help system that helps the R user to understand the R language and lets him know how programming should be done in the R language.

To get help in R language you need to click the Help button on the toolbar of RGui (R Graphical User Interface) windows. If you have internet access on your PC you can type CRAN in Google and search for the help you need at CRAN.

Use of “?” for Help

On the other hand, if you know the name of the function, you need to type the question mark (?) followed by the name of the required function on the R command line prompt. For example to get help about “lm” function type ?lm and then press the ENTER key from the keyboard.
help(lm) or ?lm have the same search results in the R language.

help.start()

Getting General help in R write the following command at the R command prompt

help.start()

Use of help.search()

Sometimes it is difficult to remember the precise name of the function, but you know the subject on which you need help for example data input. Use the help.search function (without question mark) with your query in double quotes like this:

help.search("data input")

Press the ENTER key, you will see the names of the R functions associated with the query.  After that, you can easily use ?lm to get help in R.

Use of find(” “)

Getting help in R, find, and apropos are also useful functions. The find function tells you what package something is in: for example

find("cor") gives output that the cor in the stats package.

Use of apropos()

The apropos function returns a character vector giving the names of all objects in the search list that match your inquiry (potentially partial) i.e., this command lists all functions containing your string. For example

apropos("lm")

will give the list of all functions containing the string lm

Use of example()

example(lm) will provide an example of your required function that is in this case, an example of the function lm()

Online Help

There is a huge amount of information about R on the web. On CRAN you will find a variety of help/ manuals. There are also answers to FAQs (Frequently Asked Questions) and R News (contains interesting articles, book reviews, and news of forthcoming releases. The search facility of the site allows you to investigate the contents of the R documents, functions, and searchable mail archives.

Help Manuals and Archived Mailing lists {RSiteSearch()}

You can search your required function or string in help manuals and archived mailing lists by using

RSiteSearch("read.csv")

Get Vignettes

vignette is an R jargon for documentation and is written in the spirit of sharing knowledge, and
assisting new users in learning the purpose and use of a package. To get some help in R try ?vignette. Vignettes are optional supplemental documentation, that’s why not all packages come with vignettes.

vignette()          # will show available vignettes
vignette("foo")     # will show specific vignette

Now you have learned about getting help in R, now you can continue with the other R tutorials. It is possible that you do not understand something discussed in the coming R tutorials. If this happens then you should use the built-in help system before going to the internet. In most cases, the help system of R Language will give you enough information about the required function that you have searched for.

Some Sources of R Help/ Manual/ Documentations

https://cran.r-project.org/manuals.html

https://cran.r-project.org/other-docs.html

https://www.r-project.org/help.html

https://cran.r-project.org/bin/windows/base/rw-FAQ.html

Leave a Reply