1.9 Resources

We conclude this introductory chapter on Basic R concepts and commands with some pointers to related resources.

1.9.1 Help on R

Most brains have better things to do than remembering all R commands and arguments. Instead, more experienced users of R are typically very good at looking up relevant information. To do this effectively and efficiently, knowing how and where to look is important.

The official references of the R language are pre-installed on every R system and were listed on our introductory page of Resources. Precisely how and where to look for an answer typically depends on the type of question that is being asked:

  • To see the documentation of a particular R function named abc, evaluate ?abc (in the Console or Editor panels of RStudio) to show R’s in-built help on the command with this name. For instance, evaluating ?sum provides a precise definition and some examples of the function sum (introduced above). Although some parts of the documentation may be difficult or confusing at first, it is typically helpful to examine the arguments, run the provided examples, and try to understand what they do and show.

  • A more focused and typically extensive source of help are the vignettes that come with particular packages (and are accessible via the Help or Packages panels of RStudio). A vignette typically explains the backgrounds and reasons for one or more functions and shows how it can be used to solve some task.

  • The RStudio cheatsheets provide quick visual summaries of key concepts and commands for many R-related topics and packages. For a handy language reference, check out the cheatsheets on Base R (by Mhairi McNeill) and Advanced R (by Arianne Colton and Sean Chen):

Base R summary from RStudio cheatsheets.

Figure 1.5: Base R summary from RStudio cheatsheets.

Advanced R summary from RStudio cheatsheets.

Figure 1.6: Advanced R summary from RStudio cheatsheets.

1.9.2 Learning R

There is no shortage of introductory books and scripts on R, but it is helpful to look for one that fits your interests and level of expertise.

1.9.3 Miscellaneous

Online searches for R-related information can uncover an abundance of dubious code and outright junk, but also lots of true gems. Some helpful links that do not fit into the above categories include:

  • Stackoverflow is a community-based source of many R-related questions and answers.

  • R-bloggers collects blog posts on R.

  • Quick-R (by Robert Kabacoff) is a popular website on R programming.

  • R-exercises provides categorized sets of exercises to help people developing their R programming skills.

  • A series of software reviews (by Bob Muenchen) at r4stats describes and evaluates alternative user environments for interacting with R.


ds4psy

[01_basics.Rmd updated on 2022-07-15 18:31:56 by hn.]

References

Grolemund, G. (2014). Hands-on programming with R: Write your own functions and simulations. Retrieved from https://rstudio-education.github.io/hopr/
Matloff, N. (2011). The art of R programming: A tour of statistical software design. San Francisco, CA: No Starch Press.
Phillips, N. D. (2018). YaRrr! The pirate’s guide to R. Retrieved from https://bookdown.org/ndphillips/YaRrr/
Wickham, H. (2014a). Advanced R (1st ed.). Retrieved from http://adv-r.had.co.nz/
Wickham, H. (2015). R packages: Organize, test, document, and share your code. Retrieved from http://adv-r.had.co.nz/
Wickham, H. (2019a). Advanced R (2nd ed.). Retrieved from https://adv-r.hadley.nz/