My Journey of Learning R Programming from Scratch: Mistakes and Tips for New Users (Biologist Perspectives)

Introduction

As you might have noticed, learning a programming language can be an intimidating task, especially if you have no prior programming experience. However, it is never too late to start the journey and expand your skillset. In this blog, I will share my personal experience as a biologist of learning R programming without any prior knowledge.

So, how’s everything started? this journey was driven by curiosity and the need to keep up with my labmates at Chulalongkorn University back in 2020, who were utilizing R for their master’s thesis analysis. This blog recounts my experiences, challenges, and triumphs as I navigated the steep learning process, ultimately becoming as a self claimed proficient R user, LMAO.

Code anywhere
Code anywhere

Getting Started

Like any other daunting task, the first step towards learning R programming was to establish a solid foundation. Otherwise, I began by directly installing R and R studio IDE then started to make some graphs (first mistake). At the moment I didn’t know what is wide or long format dataset and how to import it to R. Let alone understanding function and any other term, I was stuck with how to install packages, lol. Not only that, the vast amount of available information initially overwhelmed me, but I soon realized that structuring my learning was crucial. After the first mistake, researching and gathering resources, seeking online tutorials, and exploring free online courses were the things I did.

To begin, I opted for an introductory online course that provided a comprehensive overview of R programming concepts, syntax, and data manipulation. I enroll R for data science in edex. The course introduced me to the basic building blocks of R, such as variables, data types, and functions. I also familiarized myself with the RStudio environment, which proved to be an invaluable tool throughout my learning journey.

The Steep Learning Process

The initial phase of learning R programming was challenging. As someone without any programming background, understanding concepts like loops, conditional statements, and object-oriented programming required significant effort. The learning curve was steep, and I often found myself facing obstacles that seemed insurmountable.

However, I quickly realized that perseverance and a problem-solving mindset were key to overcoming these challenges. I took more time to practice and actively sought out coding exercises and mini-projects to solidify my understanding. Along the way, I encountered errors, struggled with debugging, and sometimes felt demotivated, IT’S REAL. Nevertheless, with each setback, I reminded myself that these stumbling blocks were part of the learning process and an opportunity for growth.

Resources and Support

The online R programming community played a significant role in my progress. Forums, social media groups, and platforms such as Stack Overflow provided me with a vast pool of knowledge and solutions to common programming problems. Engaging with the community not only helped me find answers but also exposed me to diverse perspectives and alternative approaches to problem-solving.

Triumph and Growth

As weeks turned into months, my perseverance began to pay off. I gradually gained confidence in writing R code, developed a better understanding of data manipulation and analysis techniques, and started exploring advanced topics like data visualization and statistical modeling.

One of the turning points in my journey was when I successfully implemented a complex data analysis project using R which is metagenomic analysis. I analyzed large biological datasets with so many data wrangling and manipulations. The feeling of accomplishment and the realization that I had come a long way from my humble beginnings further fueled my passion for R programming. The more I practiced, the more I discovered the versatility of R and its vast ecosystem of packages and libraries, which opened up endless possibilities for data exploration and analysis. I discovered so many interesting packages along the way such as gganimate, ggplotly, highcharters, flextable, flexdashboard, rayshader, spatstat, and many others.

Code anywhere
Code anywhere

Practical Sides

Done with general view of my journey, let’s move to something more practical. I’ll discuss the mistakes I made along the way, the troubleshooting methods I used, and provide some valuable tips for fellow beginners.

  1. Embracing Mistakes When I first started learning R, I made numerous mistakes. From syntax errors to logical errors, it felt overwhelming. Instead of getting discouraged, I considered them as opportunities to grow. Remember that every mistake brings you one step closer to understanding the language better.

  2. Troubleshooting Strategies a. Error Messages: R provides detailed error messages that can guide you in identifying and resolving issues. Read these messages carefully to understand what went wrong. Often, they highlight the exact line where the error occurred. b. Google and Online Communities: Utilize online resources, forums, and communities like Stack Overflow. Chances are, someone has encountered a similar issue and found a solution. Be specific when searching and try different keyword combinations to find relevant answers.

  3. Tips for New Users a. Start with the Basics: Begin your learning journey with fundamental concepts like data types, variables, and basic operations (this is what i missed). Get comfortable with these concepts before moving on to more advanced topics. b. Practice Regularly: Consistency is key when learning any programming language. Set aside dedicated time each day or week to practice coding in R. Work on small projects or solve coding challenges to reinforce your understanding. Always start with interesting project like data visualization. c. Read and Modify Existing Code: Explore existing R code and try to understand its logic. Modify and experiment with it to see how different changes affect the output. This hands-on approach will help you grasp concepts more effectively. d. Utilize Online Tutorials and Courses: Online tutorials and courses tailored for beginners can provide structured learning paths and practical examples. Websites like DataCamp, Coursera, and Codecademy offer excellent resources for learning R programming. If you need something free, there is always random Indian guy on youtube to help you :D. e. Build a Strong Foundation in Data Manipulation and Visualization: R is widely used for data analysis, so mastering data manipulation and visualization techniques is crucial. Familiarize yourself with packages like dplyr, tidyr, and ggplot2 to efficiently work with data. f. Engage with the Community: Join online forums and communities dedicated to R programming. These platforms offer opportunities to ask questions, seek advice, and learn from experienced programmers. The RStudio Community and #tidytuesday is a great place to start.

    Code anywhere
    Code anywhere

Closing remarks

I was offered so many interesting project for having this skilset. By having more personal or professional projects, I am able to colect this as my portfolio. Good luck on your journey of learning R programming, and enjoy exploring the vast possibilities it offers in data analysis and beyond! I’d be glad to have a discussion in this regard. I believe in code share, so feel free to visit my github.

Cheers, I’ll see you in the next one!

Edo Danilyan
Edo Danilyan
PhD Researcher

Interested in computational biology.