R is a powerful tool with a challenging learning curve, especially in the beginning. When you're stuck trying to do something in R (or even if you don't know where to begin), know that there are resources online for you to turn to.
First, let's make sure you are in the right place: this article is aimed at people who are using R and want to know how to find help with a particular problem, a problem like "I keep getting an error and I don't know why," or "I'm trying to do X in R and keep getting wrong results," or "Is it possible to do Y in R, and where should I start?" If you are just looking to get started learning R, please see our article Getting started with R.
The next section of this article covers several popular, free places to get help from real people: Stack Overflow, Twitter, RStudio Forums and Reddit, and talks about when each one is most appropriate and how to use it effectively, and also mention alternatives. You can learn lots about using R well by simply browsing these sites, and when you have specific problems you can get high-quality, personalized help within a couple hours of creating an account—if you use them right. However, before you post your own question any of these resources, we strongly recommend learning how to self-serve as well as possible, which is covered in the second half of this article.
If you're having trouble, following this checklist can help.
This isn't a linear process, take what's applicable to your case, and hop around between suggestions that seem likely. If you're still stumped, take your minimal reproducible example and turn to outside help.
tidyverse
. It's a much less strict forum than Stack Overflow, which makes it a more welcoming place for general advice.#rstats
tag is active on Twitter, and full of community events, announcements, and people getting help and advice. I wouldn't recommend using Twitter just for help with R, but if you are already on Twitter, follow some R icons like @jennybryan and @hadleywickham to enrich your feed, and the #tidytuesday
tag curates a data analysis and visualization challenge each Tuesday.One of R's great strengths is its documentation, though it may seem arcane until you've identified how to read it well. Always start with the Arguments section near the top, that should give you an idea of what each argument does, and then the Examples section at the bottom. Running the examples, one line at a time, is a great way to explore a function's capabilities.
Search within a single documentation page for key terms. RStudio makes this easy with a separate "find" box.
Many R packages, and especially high-quality R packages, include long-form documentation called "vignettes." For example, the hugely popular dplyr
package has 5 vignettes on various topics. You can find them all on the CRAN package page, or from your R console with the command vignette(package = "dplyr")
. Similarly, they can be view online following the links from CRAN, or locally from R with the command vignette()
command, naming one of the vignettes listed for the package, e.g., vignette(topic = "window-functions")
. The Introduction to dplyr vignette is excellent, and should be required reading for anyone who uses the package.
In summary, if your R problem is with a particular package (or functions in that package), check to see if the package comes with vignettes with worked examples. If so, they can often be extremely helpful.
Need more help? Contact us today to find out how Project Evident can help your organization better use evidence to improve outcomes for the communities you serve.