Skip to content

Latest commit

 

History

History
78 lines (61 loc) · 3.59 KB

Contributing.md

File metadata and controls

78 lines (61 loc) · 3.59 KB

Contributing to Rcpp

Interested in contributing? Great! We really welcome bug reports and pull requests that expand and improve the functionality of Rcpp from all contributors.

Reporting an Issue

When reporting an issue, the most important thing you can provide is a reproducible example. Please include the smallest possible example that illustrates the issue -- when possible, provide a snippet of C++ code that can be run using Rcpp::sourceCpp(); if it's not possible or feasible to provide such an example, provide clear instructions on how to reproduce the problem. The less effort it takes to reproduce an issue, the more likely a contributor will be able to investigate the issue + resolve the problem. Also see this StackOverflow answer on creating a reproducible example.

Issues that cannot be reproduced are unlikely to receive attention, as it is often difficult, if not impossible, to ascertain whether Rcpp is truly the culprit, or what part of Rcpp could be responsible.

Please also supply the output of sessionInfo() when reporting an issue.

Submitting a Pull Request

Considering submitting a pull request? It is strongly recommended that you first post an issue outlining some motivation for your pull request to ensure that some discussion around the appropriate resolution for the issue occurs first.

We would prefer it if your PR also included unit tests. Additions to the ChangeLog and NEWS are also appreciated.

Please note that C++ code in Rcpp must adhere to the prvailing C++ standards as selected by the current R version ("R-release") and the upcoming R version ("R-devel"). These days, Modern C++ is well supported provided recent compilers are used. As of 2024, R has supported C++17 for the past two release cycles. We tend to be a little more conservative with Rcpp and still support C++98 / C++11 as we know some users may be confronted with ancient compilers.

Coding Style

It would be nice if the contributed code followed existing conventions for whitespace and indentation. We mostly follow the R Core style for with four spaces, and curlies where K&R would put them. Our editorconfig configuration file selects reasonable defaults.

Asking Questions

Please direct general questions to the Rcpp-devel mailing list (preferred, note that only subscribers can post), or post an issue at GitHub.

Are you a new user of Rcpp? You might find the vignettes helpful in getting acquainted with the functionality Rcpp provides. The Rcpp Gallery contains a large number of examples.

Copyright

Rcpp is released as a CRAN package, licensed under the GPL-2 (or later) Open Source / Free Software license -- just like R itself. Aggregated works, i.e. code linking to R such as Rcpp will always be under this license. Your contribution has to be under a compatible licence. And to simplify matters, we strongly prefer contributions under the same terms of the GPL (>= 2) and will in general assume this license unless explicitly stated otherwise.