Rookie to R Pro: Must-Have Free Resources for Beginners

Happy Monday, 

Lately, as I’ve been talking with some of my peers, I’ve seen the importance of R more and more. Now, I already knew how important it was, but it made me sad that for instance, one of my peers never even learned ggplot (the best R package for graphing ever). I’ve also heard some Ph.D. students don’t even start coding in R until graduate school. While that is okay, I want to provide resources for people to start learning when they want to. So, whether you’re a high school student, a college student, or a graduate student, take a look at my favorite R resources that ACTUALLY make sense (and aren’t just a confusing YouTube video). 

How to use these resources

When learning R, it’s of upmost importance, that you actively take notes and code along with the activities. Promise me, you aren’t going to learn anything from just reading resources. R can be overwhelming, there are packages, libraries, R markdown, and shiny: in general, words that don’t make sense unless you’ve been using R for a while. Later, I’ll make a getting started in R post that hopefully makes sense. But, that all goes to say that taking notes will assist in organizing your brain. Furthermore, I’m a firm believer that you don’t have to memorize code to be a good coder, you just need to know when to find it. I personally have a document called my “Comprehensive R Document” where I list every code or function I learn and what it does. Then, when I need a certain function, but can’t remember the name, I just look at this document! 

Here are the resources!

SWIRL

Swirl is a package in R. Packages in R are like groupings of functions and code that are all used for the same purpose - for instance, ggplot2 is the package for all things ggplot (which means all things graphing!). In that package, there’s a variety of functions that you can use.

For Swirl, you can install the package (after you have installed R of course), and start learning R in RStudio (RStudio is an interface that makes coding in R very easy). You can then start practicing. I also just found out that they have more than just a beginner course. See here).  

CODING CLUB

This has got to be my all-time favorite resource for R, specifically for ecologists. I wish I had this while learning - although you can definitely start it whenever. They have a few different tutorials - “Stats from Scratch”, “Wiz of Data Viz”, and “Mastering Modeling”.

Using the tutorials is more confusing than Swirl, but once you get everything downloaded, they’re great to help you walk through things. These tutorials are run through GitHub so you need to follow the links on the website to download all the material. Thankfully they lead you through how to do everything, just follow the directions. 
What I like about this resource is that it gives you data to use to help you walk through functions and code. This hands-on experience using real biology data is sure to help you learn R fast! 

CODE ACADEMY

Code Academy has free resources in learning R (and other coding languages) ranging from beginner courses (linked above), to more specific subjects, like linear regression. I remember doing this course right when I started, and one thing I liked was that you had to code in the lesson in order to practice what you learned. But, as a downside, you don’t get to code in R, and I remember multiple times being confused because there was an error I couldn’t solve. It could be better now! I think I might actually check out a few more of their courses because they’re free! 

R CHEAT SHEETS

These got me through my undergraduate R courses! They’re good for remembering specific codes you’ve used and utilizing new functions that are similar to the ones you know. I wouldn’t recommend starting here but it’s a good way to remember functions and operations. They have some for ggplot2, lubridate, dplyr, readxl, tidyr, forcats, purrr, stringr, shiny, (all different packages) and more! 

My favorite sheet to use is, of course, the ggplot2 one. Since ggplot has a lot of customizations that are hard to remember, it’s perfect for needing to change the color of an axis or changing the size of the points of your scatterplot. 

PRIMERS

This is actually the first time I’ve heard of this website (I found it on twitter), but it seems incredible. They have videos and descriptions that show you specific functions or ways to code (ie, making a line graph). Then, they test you on that knowledge by making you run the code in a code box. They also will give you the solution if you’re stuck. I need to check these out more! 

Books to learn R

If you would rather read a book, here are a few options! I myself didn’t read any books while learning to code, since most of the time, I found that books were more confusing and geared towards people who already knew how to code. Yet, it seems like these two books have been geared towards learners of R. 


1) The first one is “R for Data Science”: you can buy it online, or, just download it for free here

2) The second one is Learning R: A Step-by-Step Function Guide to Data Analysis. It seems like this one is focused more data analysis and statistics, whereas the other one might just be for coding in general. 

If I were you, I’d start with the free online resources. Try taking notes and practicing the coding yourself. If that doesn’t work, maybe try one of the books! Lastly, there are courses online that you can pay for to teach you R as well. For me, I love being taught R; I’ve found that I learn the most during courses, specifically because it forces me to do work and improve my coding. But, if you aren’t in college, that can be very expensive. 

I’m always someone you can reach out to if you need assistance finding more resources or courses (I particularly like the ones from George Mason University and the Smithsonian Conservation Institute - yes, they cost money). I hope these resources will assist you in starting your R journey. It can be tough, but it’s so rewarding. Best of luck!

Previous
Previous

What I've learned in the first year of graduate school that no one tells you

Next
Next

Part 5: Unconventional ways to apply to graduate school