How I learned R – a powerful language for statistical computing, data analysis, and visualization.
About me
I’m an actuary and statistician with a strong background in public health metrics. My work involves modeling mortality rates, analyzing large datasets, and developing reproducible workflows. I also contribute to open-source projects and facilitate book clubs on R-related topics.
Why I wanted to learn R – a powerful language for statistical computing, data analysis, and visualization.
I needed a tool that could handle statistical analysis, modeling, and data visualization efficiently. While other languages like Python and SAS were options, R’s rich ecosystem for statistical computing, along with its active community, made it the ideal choice for my work in actuarial science and public health research.
How I approached learning R – a powerful language for statistical computing, data analysis, and visualization.
I started with the basics—loading data, running simple analyses, and making my first plots. As my work required more complex modeling, I dove into the Tidyverse, learning dplyr for data manipulation and ggplot2 for visualization. I also focused on reproducibility with R Markdown and Quarto.
Working on real projects was my best learning tool. Whether it was analyzing life expectancy trends or developing actuarial loss models, applying R to real data helped me understand its strengths and limitations.
Challenges I faced
• Debugging errors: Learning how to interpret R’s error messages and troubleshoot effectively was a challenge at first.
• Handling large datasets: Some of my datasets were massive, so I had to optimize performance using data.table and parallel computing techniques.
• Package dependencies and CRAN submission: When I started developing R packages, managing dependencies and meeting CRAN’s strict requirements required patience and attention to detail.
Key takeaways
• Tidyverse is a game-changer: Learning dplyr, tidyr, and ggplot2 streamlined my workflow.
• Reproducibility matters: Using R Markdown and Quarto ensures that my analyses are transparent and easy to share.
• Community engagement accelerates learning: Participating in R-Ladies, The Carpentries, and Bioconductor helped me improve my coding skills and stay up to date with best practices.
• Debugging is a skill: Learning to use traceback(), debug(), and browser() made troubleshooting much easier.
Tips and advice
• Work on real problems: Apply R to something meaningful—it makes learning more engaging.
• Embrace the community: Join R forums, book clubs, and workshops to learn from others.
• Prioritize reproducibility: Start using R Markdown and Quarto early on.
• Don’t fear debugging: Learn how to troubleshoot effectively—it’s part of the learning process.
Final thoughts and next steps
Learning R has been a transformative experience, shaping my work in actuarial science, public health, and open-source development. As I continue, I’m focusing on advanced spatial modeling, machine learning applications, and expanding my contributions to R packages.