Welcome

This book is a fast-paced hands-on introduction to R. Its goal is to give you an idea of what R has to offer, so that you can decide whether diving deeper is worth your time. The book starts with a brief introducing to R, followed by a discussion of good reasons not to learn R and some worthwhile alternatives. Then we present ten good reasons to learn R and get some hands-on experience.

The book presents modern R, with RStudio, RMarkdown, and the Tidyverse. It focuses on the parts that are essential for reproducible data analysis and keeps the technical details to a minimum. After reading it, you will know the basics of data analysis in R and should be able to decide whether you should continue learning.

This is a draft! This book is a work in progress and nobody knows when it will be finished.

Who is this for?

The book is written for someone who has some experience doing data analysis with other tools and wants to learn more about R. Your motivation might be that…

  • You are afraid of missing out and want to know what all the fuzz is about

  • You feel that your current workflow isn’t reproducible or efficient enough, and you wonder if R could help you with that

  • There is a statistical method that you would like to use, that is not available in your preferred software but it is available in R

  • You unsuccessfully tried to learn R before, but would like to try again

I’m assuming you have no or very little programming experience and you are not particularly interested in computer programming.1

The origins of this book

This book started as the speaker notes for a workshop I gave in April 2021 at my research group meeting at the University of Oslo. It was a 90 minutes long hands-on introduction to R with the goal to provide an overview of R. After the workshop, I continued to expand on the material and eventually, it turned into a more comprehensive introduction to R.

The book is a result of my passion for teaching R and my interest in the pedagogy of teaching programming. The pedagogical style is heavily inspired by that of the Carpentries lesson material, which is presented excellently in Greg Wilson’s Teaching Tech Together. In contrast to a typical Carpentries lessons, the book skips over some of the details in order to provide a broader overview.

About the author

I have worked with R and other languages in a research context for almost 10 years and I have made some humble contributions to the R ecosystem. I teach R as a certified instructor for The Carpentries, and I help maintain the Carpentries lesson material for the lesson Data Analysis and Visualization in R for Ecologists. I really enjoy teaching researchers to code and I especially like showing them the marvelous world of R.

Contribute

If you have any feedback or suggestions I’d be happy to hear from you! Contact me on Twitter or via email. Did you find a typo or have another idea for an improvement? Contributions are very welcome! Please raise an issue or submit a pull request on the book’s Github repository.

License

I am still pondering which license is best for this. For the time being, the book is published with all rights reserved by me, Tobias Busch, and may not be reproduced in whole or in part in any manner without my explicit written permission.


  1. If you are a seasoned programmer, there may be more efficient ways to catch up on R than this book. I recommend the books R for Data Science and Advanced R. Both are available for free online.↩︎