Asking for help

You can access help on any specific R function using the question mark sign, followed by the name of the function. For instance, to ask for help on the mean, you type:

# ?mean

A window with available help on the function will pop-up (like the one in the image below).

Asking for help in R

Figure 2.9: Asking for help in R

One super nice thing about R’s help is that it provides examples on how the function should be used. See, for instance, the image above, an example (indicated with the red arrow) on how to use the mean function in R. You can simply copy those lines of commands and paste them in your console. This becomes very useful, as you can simply adjust that given code to your given data.