1.4 Documentation and Help

1.4.1 Online Help

There are many useful resources available online. Search engines have developed to the point where most of the time you can simply mention r and ask whatever question you have (usually without the punctuation). For example

Google: r how to adjust margins of a plot

Most of the time you will see a researcher answer the question on their blog or a question and answer thread on Stack Overflow.

1.4.2 Built-in Documentation and Help

You can learn more about how a function works by using ? or help(), for example ?sum, help(length).

A help page will appear (by default in the lower right panel in Rstudio) with all sorts of information about the functions, including the names and uses of all the function’s arguments and what the output of the function means. Often, there are some useful examples at the bottom of the help page.

If you do not know the name of the function you need help with, you can search all of R’s documentation with ??, for example ??"bar plot". Note that you may need to use quotes if your search includes a space or any special characters.

1.4.2.1 RStudio Help Pane

By default, help pages display in the lower right pane in the Help tab. You can access help pages using the search box in the toolbar of the Help pane. You can also search within a help page using the search box below the toolbar.