Make sure you understand how the code base is organized before you contribute any code. Check out our R Journal paper for more details on the architecture. Basically, if you want to extend the functionalities to more classes, you need to implement the following S3 generic functions for the classes you want to support:
autoplot()
, which enables plotting a custom object with ggplot2
, andfortify()
, which enables converting a custom object to a tidy data.frame
For example, if you want to implement visualizations for some_r_class
objects, you need to implement the following:
fortify.some_r_class()
to extract neccessary information into a data.frame
objectautoplot.some_r_class()
that takes what fortify.some_r_class()
returns and create suitable visualization using ggplot2
syntaxBefore sending your pull request for review, make sure your changes are consistent with the guidelines and follow the coding style described in this document.
devtools::test("pathToPackage")
to execute all the unit tests locally.We are following Google's R style guide that can be found here.
DESCRIPTION
.cran-comments.md
and NEWS.md
.devtools::check(args = c("--no-build-vignettes"))
for regular CRAN checks without building vignettes.devtools::check(args = c("--no-build-vignettes"), env_vars = c(
R_CHECK_DEPENDS_ONLY= "true"))
to test the package with the assumption that some suggested packages may be missing from CRAN.remove.packages(c('cluster', 'changepoint', 'fGarch', 'forecast', 'ggrepel', 'glmnet', 'KFAS', 'lintr', 'mapdata', 'MASS', 'MSwM', 'nlme', 'raster', 'ROCR', 'sp', 'strucchange', 'survival', 'timeSeries', 'vars', 'xts', 'zoo', 'lfda'))
These packages can be installed back via devtools::install_dev_deps()
* Run devtools::release()
to release.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.