Help in R

R offers some good resources to help you learn about its functions. For example, if you put a question mark before a function name, on the lower right quadrant of RStudio some help will pop up.

  • For example, type in ?sqrt in your script.
  • Then, help will pop up on the bottom right hand quadrant of RStudio.

 

  • These give documentation about how to use the function, what arguments it takes, and some example code. Usually, I scroll down to the example code and find what I need there. It takes some experience to understand what the help pages to do be honest, but they eventually get to be very useful.
  • You can also precede a function name with two question marks ?? to search all of your installed packages for it.
  • Type in, ??read_excel

 

This is useful if you know there's some sort of R function but you don't remember what package it's in. So if you get some code with the function read-excel in it but you forgot to load the readxl package, you can search for it using this double question mark and it'll tell you which one's to load.