Preface

Who are the authors:

  • Jeff Jones (PhD), Senior Scientist Proteomics, Division of Physics, Mathematics and Astronomy, Caltech, California USA

  • Heath Patterson (PhD), Director of Spatial Biology Bioinformatics, Aspect Analytics, Genk, Belgium

  • Ryan Benz (PhD), Director Data Science, Seer Bio, Redwood City, California USA

Who is the audience? This book is aimed at absolute beginners in R and programming in general. The topics covered are designed to be straightforward and easy to follow, and by the end of the book, readers should be able to develop analytical processes for their own research, provide means for others to accomplish analyses, and extend their skills with more advanced literature.

Although no previous knowledge of R is required, some experience with data and statistical analysis is recommended. Reading and understanding the chapters and exercises should provide the skills necessary for basic data analysis and prepare readers for more advanced concepts and skills.

What Is Covered? The purpose of this book is to provide you with a comprehensive guide to the R programming language, as well as to teach you how to use RStudio, tidy data, the tidyverse ecosystem, and ggplot2. By the end of this book, you will have a solid foundation in R and the skills necessary to conduct data analysis and visualization.

Our goals for this book are:

  • Learn the fundamentals of the R programming language, including variables, data types, functions, and control structures. You will also learn how to write and execute basic R scripts.

  • Learn to use the RStudio integrated development environment (IDE), including how to navigate the interface, create projects, and install packages.

  • Learn about tidy data: what it is, why it’s important for data analysis, and how to use the tidyr package to transform data into a tidy format.

  • Learn the basics of the tidyverse ecosystem of R packages, including dplyr, tidyr, and ggplot2, and how they can streamline the data analysis process.

  • Learn to create data visualizations using the ggplot2 R package, including how to customize plots, add themes and colors, and create complex visualizations.

What Is Not Covered? This book is designed to provide you with a comprehensive introduction to R programming. While we cover a variety of essential topics, we don’t cover everything. For instance, we do not go into depth on statistical analysis, probability, regression, machine learning, or any other advanced analytical topics. We also do not cover constructing R packages, documentation, markdown, or any other advanced R programming topic.

Why create another book on R? This book serves as the foundation for the Introduction to R course at the annual conference for the American Society for Mass Spectrometry (ASMS). It’s a permanent, expandable, and revisable reference document created by the authors. It evolved from a presentation used as instructional material in the “Getting Started with R” short course. This tome provides greater depth of coverage on various topics and records instructors’ nuanced approach to R. The book is a living document, improved based on feedback.

When was this book developed? The initiative that resulted in the creation of the R Book started in 2017, when a group of experts in the field came together to offer a series of workshops at the annual ASMS conference. These workshops were aimed at teaching attendees how to effectively use R, a programming language used in statistical computing and graphics. Year after year, the workshops drew a significant number of attendees, with between 200 and 300 people participating for three consecutive years.

Building on the success of the workshops, the presenters decided to offer a more formal short course in 2020, which was a remote year due to the COVID-19 pandemic. The course proved to be very popular and was well-received by participants for 2020 (Virtual), 2021 (Philadelphia, PA), and 2022 (Minneapolis, MN).

Following the positive response to the short course, in 2023, it was decided to convert all of the teaching materials and resources used in the workshops and course into a formal book. This book, the R Book, was created with the aim of providing a comprehensive and accessible guide to using R, and has since become a valuable resource for students, researchers, and professionals alike.

Where can the book be accessed? The book is available online here. Additionally, this book and it’s contents are covered at the annual American Society for Mass Spectrometry (ASMS), typically the first week in June the weekend prior to the scientific meeting.