Where to ask for help when coding in R

[This article was first published on R on R (for ecology), and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

When learning R, it can be tough to figure out how to apply what you’ve learned to your own data. We often learn general skills that are helpful for manipulating our data, but things aren’t always so simple when it comes to your own analysis. Sometimes, we have very specific problems that we need to address but don’t know how.

In this blog post, I’m going to describe a few R forums that are particularly useful when you need specific help with your own project.

As an example, let’s say that we want to replace a specific character of every word (string) in this vector:

words <- c("Apple", "Orange", "Banana", "Peach", "Nectarine")

I know that there must be a function that can address this, but I don’t know how to accomplish my particular need.

No worries, we’ll just turn to Google real quick. How convenient—one of the first results is someone asking a similar question on StackOverflow. Even better, there are a whole bunch of related questions that are listed underneath the main result, in case any of those might also help me out.

Example google search of How to replace a character in a string in R with the second result circled with a red circle and arrow pointing to it.

If we click on the link, we can see the specific question that the person asked.

Example StackOverflow post showing someone who wants to know how to replace specific characters within strings in a vector.

And if we scroll down further, we can see the answers that people have provided. The really awesome part about StackOverflow and similar forums is that you can receive opinions from multiple people. There will always be multiple ways to solve a problem, and learning about the multiple ways can help you think more creatively when you code. People will often also comment on the answers themselves, generating discussion about why a certain method might be better than another, or how it can be improved.

The first answer to the StackOverflow post, showing that it has 453 upvotes as well as other people commenting on the answer and generating further discussion.

The second answer to the StackOverflow post, showing that it has fewer votes but provides another point of view on the topic.

These forums are great references because you’ll find that a lot of people have similar questions to you. But there are also situations where you’re analyzing your data and have a question that is VERY specific to your data or analysis. Times like this will call for you to make your own detailed post!

I highlighted StackOverflow in this blog post, but there are a number of other sites that serve similar purposes.

Here are some of my favorite forum resources:

…for questions seeking advice on statistics or research:

Now go forth and add all these resources to your R toolbelt! Feel free to leave any of your favorite resources in the comments below.



If you liked this post and want to learn more, then check out my online course on the complete basics of R for ecology:

Also be sure to check out R-bloggers for other great tutorials on learning R

To leave a comment for the author, please follow the link and comment on their blog: R on R (for ecology).

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)