Introduction

Table of Contents

This guide is organized into three parts.

  1. First, we’ll run through The proper way to structure and test packages.
  2. Second, we’ll discuss Version Control with Git and GitHub
  3. Lastly, we’ll briefly look at a couple of IDEs, which are just pieces of software that make it easier to write packages.

Here’s a link to a great devtools cheatsheet which puts most of the useful commands in this guide in one place.

We also wrote a small development example package (called devex) which you can find linked here, on GitHub. If you haven’t used GitHub yet, don’t worry - we’ll go over how to use GitHub later.

Also, this guide is still under development, and we take feedback! If you find anything confusing or think the guide misses important content, please email help@iq.harvard.edu

Authors and Sources

It’s worth acknowledging a few people who helped make this guide possible. First of all, Simo Goshev and Steve Worthington at Harvard’s IQSS helped design the structure of the guide and edited the content. Second, Asher Spector at Harvard College did the hard work of actually writing the tutorial in Rmarkdown and configuring the GitHub repo and website. Third, Jinjie Liu at IQSS helped to polish the content. Fourth, this guide was written for a different audience, but a lot of its structure and content is based on Hadley Wickham’s book R Packages. To help write the sections on testing, we also referenced Christopher Gandrud’s ‘Failing Faster’ Presentation, and Christopher Gandrud’s Broader Testing Guidelines. For the section on on Version Control, we referenced Karl Broman’s Book, a Git-Tower post, and the GitHub documentation here and here to help write this guide.