-
Notifications
You must be signed in to change notification settings - Fork 9
Development philosophy
Caleb Easterly edited this page May 9, 2019
·
4 revisions
- try to minimize the use of dependencies as much as possible. If a package is only used to do 1 or 2 things, those can usually be done in base R. Having fewer dependencies makes the package easier to install and maintain.
- all plots are built with
ggplot2
, for aesthetic consistency - all plots should support black-and-white modes
- plot methods should not include anything that is easily modifiable by the user (i.e., they shouldn't include a
title
argument, in favor of someone usingggtitle()
on the returned object. - if a plotting function modifies the input, it can be useful to return the modified data
- Use Roxygen to document every function.
- However, we don't need to show everything in the package index. Type the following as a Roxygen comment to generate the documentation file without including the function in the package index.
#' @keywords internal
- following the DRY principle, we can port comments across functions by using
#' @importParams <other function>
. This is used extensively with plotting functions, which all calladd_common_aes()