Welcome

This book is superseded.

These are solutions to the 1st edition of R for Data Science . A 2nd edition has since been published, with its own solutions to the exercises .

This site is no longer maintained. It is kept online for reference.

Cover image

This book contains the exercise solutions for the 1st edition of R for Data Science, by Hadley Wickham and Garret Grolemund (Wickham and Grolemund 2017).

That edition is available online at r4ds.had.co.nz, and a physical copy is published by O’Reilly Media and available from amazon.

A 2nd edition of R for Data Science has since been published. These solutions have not been updated for it. For the current edition, see R for Data Science (2e) — Solutions to Exercises by Mine Çetinkaya-Rundel.

Acknowledgments

These solutions have benefited from many contributors. A special thanks to:

  • Garrett Grolemund and Hadley Wickham for writing the truly fantastic R for Data Science, without whom these solutions would not exist—literally.
  • @dongzhuoer and @cfgauss for careful readings of the book and noticing numerous issues and proposing fixes.

Thank you to all of those who contributed issues or pull-requests on GitHub (in alphabetical order): @adamblake, @aituarov, @andrewyimingchen, @AnttiRask, @arbtyler, @beacurious, @benherbertson, @bhishanpdl, @bob100000000000, @carajoos, @chrisyeh96, @clemonsa, @daczarne, @dcgreaves, @decoursin, @delabi, @demar01, @dongzhuoer, @dvanic, @edavishydro, @EnzoNMigliano, @eric-k-zhu, @forstem6, @ghost, @GoldbergData, @gvwilson, @henrikmidtiby, @ihagerman, @IngridHang, @JamesCuster, @jcornickm, @jdblischak, @jhanarato, @jhoeting, @jlbeaudry, @jmclawson, @JNNielsen, @kxchia1, @Lextuga007, @liuminzhao, @lopierra, @martinruhle, @matthewlock91, @mgeard, @mjones01, @mroviras, @mubangansofu, @mugpeng, @mvhone, @nataliegnelson, @nattalides, @nchan08, @neander09, @nickcorona, @nielsenmarkus11, @nzxwang, @persep, @petehaha, @qichun-dai, @r2ressler, @r2resslergm, @RandallEW, @rbjanis, @ReeceGoding, @ricardosasso, @robtpitts, @Seyitosin, @Shurakai, @sijia-w, @StewartToopKSCLOUD, @TheMksConnection, @timothydobbins, @tinhb92, @vzei, @xiaoouwang, @xinrui112, @zhaoxiliang, and @zidra Thank you to all of you who contributed annotations on hypothes.is (in alphabetical order): @12379Monty, @aaroncook, @adamnicholson, @akuczynski, @Ali.A.A, @alidahud, @allisonschiltz, @Amaks, @ameliabedelia, @anans, @anjelicam, @anniemorgan, @arboc, @ashokjswl, @BBang, @bkuettel, @Bokelu, @Branicek, @Carlito_Fluito, @cearow, @cfairfield, @cfgauss, @chaoh, @chova32, @CL_BZH, @ClaireLin, @cthawley, @dahei, @daitou, @danielBraddock, @DaXVs, @DenisKazakov, @dionisius, @egurtzegi, @Ehab.H, @electricdinosaurs, @Eric12, @excuthoka, @Eyayaw, @fale, @fbriody, @felipe_lopes, @ffs, @forstem6, @funnytommy, @gabrivera, @Gandolf, @gbganalyst, @giorgitsu, @gmilano, @HappyMutant, @harmonica2nd, @hazarara, @hillad, @inkish, @IvanM26, @ivanonymous, @jeffboichuk, @jeho, @jhoeffler, @jlopez11, @jo_geographer, @JohnOLeary, @JuliaMarchetti, @Karachow, @kylezollo, @learner11, @Leiard, @LeslieWu, @liuminzhao, @ludsfer, @luke14, @MadMedDz, @MajorosMask, @malaradi, @manhuawangca, @mc2mc, @mcpinazo, @MeatloafMalady, @meilingsoh, @mibra, @milorad22, @mlehmann, @MonkeyOfWAR, @mschwindi, @mtcruz, @n7leadfarmer, @Nancowill, @nofacetou, @nurefsansariipek, @omscortiol, @over, @Peng_001, @petzi, @Pherb, @pooja.desai, @postylem, @rohum, @RunAlongSpot, @Scottmeup, @sfl28, @shgoke, @shmuhammad, @siddharthabingi, @sjmazer, @SLJ83, @srpnr, @stewie, @stirlingschneider, @sunxm03, @tcroft, @techmoerror220, @test_dummy, @testlum, @threni, @thwings, @torio, @Traumstrasse, @twarczak, @Vahidkiaa, @Vary, @WindSnowflake, @Winsloww, @wukong, @wxshlh, @zacpol, @zettlchen, @zhiwei_li, @ziangang, and @Zuosinan_Chen.

For another set of solutions for and notes on R for Data Science see Yet Another ‘R for Data Science’ Study Guide by Bryan Shalloway.

License

This work is licensed under a Creative Commons Attribution 4.0 International License.