-
Notifications
You must be signed in to change notification settings - Fork 8
Coding Notes
##Package Design The website on R packages by Hadley Wickham is considered the bible for the overall package design. It is of course at http://r-pkgs.had.co.nz. We will follow his instructions to the letter unless we have a strong reason to diverge (and we will document this).
Code style will be as detailed on http://r-pkgs.had.co.nz/style.html.
The other key reference is Advanced R also by Hadley Wickham. http://adv-r.had.co.nz. It is not necessary to read everything but if we have questions regarding R programming this will be our go to reference.
We will perform testing using the testthat
package.
We will check basic information about arguments such as is.string
, is.flag
etc using
the asserrtthat
package as this gives informative error messages. We make
all errors, warnings or messages informative so the user can fix quickly and easier. If in doubt
we will throw an error to stop the user doing something stupid.
We will use the escape hatch on all functions to avoid non-standard evaluation. See http://adv-r.had.co.nz/Computing-on-the-language.html.
We will minimise the number of packages wqbc depends on to reduce the chance of future updates breaking wqbc.