Skip to content
joethorley edited this page Dec 24, 2014 · 2 revisions

##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

Code style will be as detailed on http://r-pkgs.had.co.nz/style.html.

R programming

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.

Testing

We will perform testing using the testthat package.

Messages and Errors

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.

Non-Standard Evaluation

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.

Package Dependencies

We will minimise the number of packages wqbc depends on to reduce the chance of future updates breaking wqbc.

Feel free to add notes