Contributing to RdistNN
Source:CONTRIBUTING.md
The initial public release focuses on CATE, nonparametric regression, and their supporting DNN weights, tuning, diagnostics, and plots. All PLQR functionality and local IV-GMM are experimental. Please open an issue before proposing a new estimator or a change to an exported interface.
Local setup
Use R 4.1.0 or newer and a C++17 toolchain. OpenMP is optional. Install the development tools and package dependencies from the repository root:
install.packages(c("devtools", "pkgdown", "rcmdcheck", "yaml"))
devtools::install_deps(dependencies = TRUE)Documentation is generated with roxygen2 8.0.0, as declared in DESCRIPTION; use that version to avoid namespace drift. If needed:
install.packages("remotes") # if not already installed
remotes::install_version("roxygen2", version = "8.0.0", upgrade = "never")Editing and checking
- Document exported functions in their R source. Regenerate help with
devtools::document(); do not hand-editNAMESPACE,man/*.Rd, orRcppExports.*. - Edit
README.Rmd, then rundevtools::build_readme(). - Write small, deterministic examples. Mark oracle quantities explicitly and keep simulation illustrations distinct from manuscript evidence.
- Preserve matrix and data-frame interfaces, returned fields, and defaults during documentation or packaging changes.
- Add focused testthat coverage for changes to behavior or validation. Read
AGENTS.mdand the linked design policies for the detailed contracts.
For package behavior changes, run devtools::test() and relevant focused checks. The test-suite map lists the behavior-based files, shared helpers, focused filters, and optional visual tests. Before a release, run the full package and site builds described in RELEASING.md. Documentation changes should at least execute their changed examples and verify their links and generated output.
The existing alignment checks can be run from the repository root:
Reporting problems
Open an issue with a minimal reproducible example, the expected and actual results, and sessionInfo(). For numerical discrepancies, also report whether they persist with options(RdistNN.use_compiled = FALSE). That selects supported R algorithms; it does not remove the compiler requirement for source installation.
For a pull request, describe the concrete change, its scope, and the checks run. Update NEWS.md for user-visible changes. Exclude generated check directories, source archives, rendered site files, and harvested CI logs from commits.