Welcome

This is the website for Solutions to ggplot2: Elegant Graphics for Data Analysis, a solutions manual to the exercises in the 3rd edition of ggplot2: Elegant Graphics for Data Analysis, written by Hadley Wickham, Danielle Navarro, and Thomas Lin Pedersen. While there are bookdown solution manuals to Hadley Wickham’s Advanced R and Mastering Shiny, there is no such thing for the ggplot2 book. This website is an attempt to fill this missing void.

The solutions are entirely worked out by Howard Baek. In Chapters 2 and 3, some solutions are from Manuel Rademaker and kangnade.

If my work has helped you, you can buy me a coffee on Ko-fi!

0.1 About the Author

Howard Baek is a Master’s Student in Biostatistics at the University of Washington and has been programming in R since 2016. He is an avid tidyverse user (his blog is named “Inside the Tidyverse”) and has used ggplot2 extensively for data visualization in his projects.

0.2 Notes on the book

  • Many book chapters do not contain exercises : Chapters 6~9, 12, 13, 16, 18, 20~22.
  • I acknowledge using Manuel Rademaker’s solutions with (Rademaker, 2016) and kangnade with (kangnade).
  • I didn’t know the answer to a couple exercises, and noted these down by writing “Not sure”. Particularly, the later exercises in Chapter 19 were challenging.
  • Please submit a pull request if you want to contribute to these solutions!

0.3 Acknowledgements

I want to acknowledge the authors of the ggplot2 book, Hadley Wickham, Danielle Navarro, and Thomas Lin Pedersen, for writing an awesome book and providing it online. Yihui Xie’s work in the bookdown package has allowed the smooth creation of this book and many others. Also, the book’s format closely mirrors that of Advanced R Solutions, which is a complete solution manual that has been published into a physical book. I want to thank Maya Gans and Marly Gotti, who gave me advice on setting up the website. Finally, Alison Hill and Desirée De Leon’s talk, Sharing on Short Notice, made getting this book online smooth and easy.

A huge thank you to the following contributors who suggested improvements: EatsleepfitJeff