I'm a microbiology major interested in epidemiology and public health, and I've started learning R through a two-hour Freecodecamp video. However, I'm finding that instead of focusing on R, the content dives into coding basics and tools like Git and GitHub, which is overwhelming since I have no prior coding experience. It feels like I need a lot of foundational knowledge before I can even begin with R. Can anyone recommend the best way for a complete novice to start learning programming? I'd also appreciate suggestions for the best free R resources, or whether it would be worth enrolling in the John Hopkins R tutorial or purchasing a Datacamp course.
4 Answers
Before diving into R, think about your background. R is heavily focused on statistics, so it's beneficial to have some knowledge in that area. If you're starting from scratch, I recommend beginning with Python since it's generally easier to learn and versatile for various data tasks. Plus, understanding how to set up your environment and use version control is crucial, but it can be daunting without prior experience. It’s a part of the learning curve, so don’t worry, this feeling is common!
For public health, having a solid understanding of statistics is key, and R is great for that. You don’t need to be an expert in programming to use R, but having a basic grasp helps. Honestly, taking a beginner programming course could ease you into it. If you're comfortable with Python, it’s quite similar to R and learning some basic Python could help in your transition. Here are a few useful resources to check out:
- [Hands-on Programming with R](https://rstudio-education.github.io/hopr/)
- [YaRrr! The Pirate's Guide to R](https://bookdown.org/ndphillips/YaRrr/)
- [An Intro to Statistical Learning](https://www.statlearning.com/)
These resources provide a good mix of theory and practical skills, and since you're still in school, consider taking a statistics course if possible!
Thanks a lot for the recommendations!
Given your focus on public health, I understand why you'd want to learn R, as it's often preferred in your field. However, if you’re completely new to coding, Python might give you a smoother introduction. Many find it more approachable, and it's definitely worth considering based on your comfort level and goals.
If you're really set on R for epidemiology, a pointer could be to use the Swirl package. It helps you learn R interactively within the R environment, so you can skip dealing with all the setup hassles right off the bat. Just a heads up, starting with R can be tough as a first language, but it can be done if you're committed.

I totally get that! I’m actually focusing on public health too and I thought R would be more relevant but I'm still torn over whether I should just start with Python.