The following is a step-by-step guide to creating your own R package. Even beyond this course, youmay find this useful for storing functions you create for your own research or for editing existingR packages to suit your needs.
This guide contains three different sets of instructions. If you use RStudio, you can follow the “Ba-sic Instructions” in Section 2 which involve using RStudio’s interface.
Comments
This is one of the best tutorial by Fong Chun Chan
http://tinyheero.github.io/jekyll/update/2015/07/26/making-your-first-R-package.html
Notes/Blog by Hilary Parker is also very informative https://hilaryparker.com/2014/04/29/writing-an-r-package-from-scratch/