You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Caleb Easterly edited this page May 9, 2019
·
4 revisions
Dependencies
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.
Visualization
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 using ggtitle() on the returned object.
if a plotting function modifies the input, it can be useful to return the modified data
Documentation
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 call add_common_aes()