This repository is a sample R package which has been set up to explore the different steps in creating and maintaining an R package.
It follows the R package book (http://r-pkgs.had.co.nz) closely. I have created branches that essentially correspond to the chapters in the book. I have been using rather atomic commits to highlight the most important steps or configuration options.
DESCRIPTION (Book chapter)
For a sample R package DESCRIPTION file check here for example: https://github.com/tidyverse/ggplot2/blob/master/DESCRIPTION
The generated R package DESCRIPTION file lists both an Author
and Maintainer
. It is however recommended to use the Authors@R
field. For example:
Authors@R: person("Mac", "D", email = "yourself@somewhere.net", role =
c("aut", "cre")
I left this open. If it is specified a LICENSE file needs to be added. It is easiest to use GitHub for this and select an appropriate license. If chosen, GitHub will add the license file to the repo.
The most relevant documentation options for functions and packages have been included in this example. The R package book also provides information on documenting Classes, Generics and Methods. This has not been covered in the committed code.
Notes regarding CI with Travis go here. I am starting with the most basic setup using the YAML file generated with devtools::use_travis()
:
language: R
sudo: false
cache: packages
- Hadley Wickham's R package book: http://r-pkgs.had.co.nz
- ...