Site icon R-bloggers

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.

< !-- I think this sentence needs a change because it's different than what the google search is. Also good to refer to the the example as "this" and use : if you are about to show it. --> < !-- Original sentence: As an example, let's say that we want to replace the second character of every word (string) in a vector.-->

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.

< !-- for some reason, using knitr and pasting the images this way does not seem to work for the website when accessing the RSS feed. From now on when adding images, use this command, which also includes the descriptive text which is important for accessibility. You'll notice that I also changed the names of the images to include an indication of which blogpost this is for. This is because for the RSS feed to work, I need to put all the images (from all blogs) into the same folder. -->

< !-- you can add linked images like this: --> < !-- [!["Video thumbnail of tutorial on exporting a dataframe from R into a table in MS Word"](troubleshootresources_Image 2.png)](https://youtu.be/_sb5uI8qTlk) -->

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

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.

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.

< !-- good to use # for adding headings. one # is heading 1, ## is heading 2, etc. -->

Here are some of my favorite forum resources:

…for questions related specifically to coding in R:

< !-- Use the regular HTML format for adding links so that you can specify that you want the links to open in a new tab. This is important.--> < !-- Also, can use ** around something to make it bold. Good to use this for the links-->

…for questions seeking advice on statistics or research:

…for any type of question related to R and data analysis!

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.