R for Data Science Walkthrough
2020-01-21
Introduction
The free online version of the book R for Data Science by Hadley Wickham and Garrett Grolemund can be found at http://r4ds.had.co.nz/index.html. This is the version that I will be working with.
Here, I work through each chapter of the book and provide my take on the solutions to their exercises, and also mix in some of my own notes and explorations. I highly recommend walking through their book if you are trying to learn how to use the tidyverse for data wrangling and analysis. You can navigate to a specific exercise using the table of contents on the left hand side of this webpage.
My solutions may not be perfect, but hopefully they provide some insight into how each exercise can be answered. Although there are no formal solutions for this book, a more comprehensive and well-polished guide by Jeffrey Arnold can be found at https://jrnold.github.io/r4ds-exercise-solutions/.
About me
I used this book back when I was a PhD student in the Biomedical Sciences program at UCSF. For one of my research projects, I needed to perform RNA-sequencing experiments in order to characterize the gene expression changes that occured after immune cell activation. Typically, this type of differential gene expression analysis is performed using a suite of bioinformatics R packages available on Bioconductor (DESeq2, etc.) and requires a lot of data wrangling and processing. This book taught me useful techniques in R to help process the RNA-seq data, perform exploratory data analysis, create visualizations, and gain valuable insights. I still use many of the tools I learned from this book in my day-to-day life as a scientist, particularly when it comes to analysis of large datasets and bioinformatics.
Back then, I initially walked through this book by answering each exercise in a set of R notebooks, which you can find in the directory _before_bookdown
in the github repo for this book at https://github.com/erilu/R-for-data-science-walkthrough. I recently wanted to learn how to use bookdown, so I converted my set of notebooks into a bookdown website as a mini-project. I hope that whoever is reading this out there will find some utility in this.
Thanks for stopping by!