Skip to Main Content

R

Getting Help in R

If you want to know more about a specific function, you can use R's built-in help facility by using the help() function. For example, to open the help page for our friend the lm() function.

help("lm")

Alternatively, you can use the equivalent shortcut:

?lm

After running the code, the help page will be displayed in the ‘Help’ tab in the Files pane (usually in the bottom right of RStudio). This help page explains what the function does, its arguments, and provides examples.

Other Sources of Help

A wealth of free online resources is available, ranging from comprehensive courses to specialized tutorials and mailing lists. While there are paid options, you don't need to spend money to find excellent materials. Below are some resources we've found helpful.

General R Resources

Getting Help From Others

  • Google It!: Try Googling any error messages you encounter. It's common practice, and you'll likely find that others have faced and solved the same issues.

 

  • Stack Overflow: There are thousands of R-related questions on Stack Overflow. Check out the most popular ones, ranked by votes. Before asking a new question, search for similar queries and include a reproducible example to get the best advice. A reproducible example is a minimal, self-contained code snippet that illustrates the problem.