I (Jenny) piloted the main bits of HW10 Building your own R package. This might help you figure out how best to spend your first hour on this homework.

Get to the starting line

Skip almost to the finish line

I’m pretty sure I’ll be able to do the micro-exercises, at least as time allows. But all of that work will be wasted if, when time to submit, I don’t have a vignette, my package doesn’t install from GitHub, and/or my README is crap. I’m going to make sure that stuff is set up and working before I loop back to the fiddly stuff.

I edited the vignette in vignettes/overview.Rmd then did

library(devtools)
build_vignettes()
## Build and Reload via RStudio here!
library(gameday)
browseVignettes("gameday")

I confirmed my edited vignette was rendered and served up to me. Vignette stuff working. Yay. Stage, commit, push.

Let me confirm my currently installed version of gameday is Bernhard’s:

maintainer("gameday")

Yep, it reports Bernhard. That’s because I haven’t edited DESCRIPTION yet, but there’s a reason for that.

De-install gameday and confirm it’s truly gone from my libraries:

remove.packages("gameday")
## Restart R session
library("gameday")
## Error in library("gameday") : there is no package called ‘gameday’

On GitHub, in the browser, edit DESCRIPTION to make me the maintainer.

Re-install from GitHub:

library(devtools)
install_github("jennybc/gameday")
## all should go well
maintainer("gameday")
## [1] "\"Jennifer Bryan\" <[email protected]>"

YES I can install from GitHub. I know it worked because I did not get an error message and the maintainer is now me, which proves I’m running the GitHub version of gameday. Yay. Pull from GitHub to get DESCRIPTION.

Finally, add basic install and run instructions to README.md:

library(devtools)
install_github("jennybc/gameday")
gday("canucks")

Stage, commit, push. Check README looks OK on GitHub. Yay.

This took me about 45 minutes. Now, and only now, would I start knocking off the homework tasks. I would be scrupulous to document, test, and check often to make sure I don’t lose the precious quality my package has right now: it works.