Nistara Randhawa gave a presentation on writing your own R package. Unfortunately the audio malfunctioned on the livestream, but Nistara’s incredibly helpful post accompanying the presentation can be found at the link below. From Nistara:
Learn how to write and document your own packages using devtools and github. You’ll need git and rstudio installed on your laptops (the prerequisites listed on http://stat545.com/git07_git-github-rstudio.html are useful for this), as well as the ‘devtools’ library
Nistara’s post on Writing your own R package.