What other computers on campus have R?

  • All campus computers should have R & R Studio installed on them.
  • Butte 207 & 211 are open computer labs.
  • Wildcat Lab

Getting started / Installing Programs


Common Error Messages

Taken from: http://blog.revolutionanalytics.com/2015/03/the-most-common-r-error-messages.html

  • could not find function errors, usually caused by typos or not loading a required package
  • Error in if errors, caused by non-logical data or missing values passed to R’s if conditional statement
  • Error in eval errors, caused by references to objects that don’t exist
  • cannot open errors, caused by attempts to read a file that doesn’t exist or can’t be accessed
  • no applicable method errors, caused by using an object-oriented function on a data type it doesn’t support
  • subscript out of bounds errors, caused by trying to access an element or dimension that doesn’t exist
  • package errors caused by being unable to install, compile or load a package.

I get an error message that I don’t understand

Start by googling the error message. However, this doesn’t always work very well because often, package developers rely on the error catching provided by R. You end up with general error messages that might not be very helpful to diagnose a problem (e.g. “subscript out of bounds”). If the message is very generic, you might also include the name of the function or package you’re using in your query.

If you check Stack Overflow, search using the [r] tag. Most questions have already been answered, but the challenge is to use the right words in the search to find the answers: http://stackoverflow.com/questions/tagged/r

⚠️ Development of R moves pretty fast. When at all possible, use results from the past 1-2 years. Anything over 5 years old for packages such as ggplot, dplyr, and forcats are likely obsolete.


Where can I get help using R outside of class time?

Use the built-in RStudio help interface to search for more information on R functions

One of the fastest ways to get help is to use the RStudio help interface. This panel by default can be found at the lower right hand panel of RStudio. As seen in the screenshot, by typing the word mean, RStudio tries to also give a number of suggestions that you might be interested in. The description is then shown in the display window.

I know the name of the function I want to use, but I’m not sure how to use it

If you need help with a specific function, let’s say barplot(), you can type:

?barplot

If you just need to remind yourself of the names of the arguments, you can use:

args(lm)

I want to use a function that does X, there must be a function for it but I don’t know which one…

If you are looking for a function to do a particular task, you can use the help.search() function, which is called by the double question mark ??. However, this only looks through the installed packages for help pages with a match to your search request

??kruskal

If you can’t find what you are looking for, you can use the rdocumentation.org website that searches through the help files across all packages available.

Finally, a generic Google or internet search “R <task>” will often either send you to the appropriate package documentation or a helpful forum where someone else has already asked your question.

From a real live person

For Spring 2025 help is available both in person and online.

  • Attend Community Coding.
    • Drop in work session & dedicated space to work on coding projects.
    • Collaborate with your peers and learn from experts.
    • Some hours are held over Zoom
  • The Discord Server
    • Go to the #class-selection text channel in the left sidebar, and click the RStudio icon emoji under the second post to self-assign you to the Math-130 role, or click on the Snake icon emoji to self-assign you to the Math-131 role. This will let you see and access the class channels.
    • See Syllabus: Student Support for details

Online from people

  • In RStudio go to Help –> Cheatsheets
  • R Studio Cloud interactive lessons: https://rstudio.cloud/learn/primers
  • Stack Overflow: if your question hasn’t been answered before and is well crafted, chances are you will get an answer in less than 5 min. Remember to follow their guidelines on how to ask a good question.
  • Join the discord server.
  • The R-Studio Community: it is read by a lot of people and is more welcoming to new users than the R list-serv.
  • If your question is about a specific package, see if there is a mailing list for it. Usually it’s included in the DESCRIPTION file of the package that can be accessed using packageDescription("name-of-package"). You may also want to try to email the author of the package directly, or open an issue on the code repository (e.g., GitHub).
  • Twitter: #rstats

Written references

If you’re a book kinda person, there is plenty of help available as well. Many have online versions or free PDF’s.

Want to get fancy?


Random blogs