Repository navigation
Development Guide
Run development commands from the freqtables package root, not the wiki
checkout. File paths below are relative to the package root. Everything under
dev/ is excluded from the source package by .Rbuildignore.
| Location | Purpose |
|---|---|
R/ |
Package functions and roxygen documentation sources. |
man/, NAMESPACE
|
Generated help and exports; regenerate from R/. |
tests/testthat/ |
Current automated tests and small synthetic fixtures. |
vignettes/ |
Current executable user guides. |
README.Rmd |
Source for the generated README.md. |
data-raw/ |
Script used to create the bundled study data and comparison exports. |
inst/extdata/ |
Study data exports and Stata/SAS comparison material. |
dev/ |
API specifications, development checks, and validation records. |
dev/archive/ |
Historical scratch code, notes, and unused vignette images/CSS. |
dev/assets/ |
Editable hex-logo artwork and alternate exports; the PNG remains in man/figures/freqtables_hex/. |
The implemented API is described in dev/api-specification.md
and dev/contingency-api-specification.md.
dev/freq_tables.R is a deferred multi-outcome prototype; it is not
exported or used by the package. Archived scripts use earlier APIs and are
retained for reference, not as current tests.
The following commands use testthat, pkgload, roxygen2, and rmarkdown
from the development environment. Install missing development tools separately
from the package's runtime dependencies.
testthat::test_local()
pkgload::load_all()
source("dev/check-vignette-coverage.R")The coverage check compares every exported function and registered S3 method
with the argument inventory in inst/vignette-coverage.csv, including each
referenced vignette section and executable chunk.
After changing documentation sources:
roxygen2::roxygenise()
pkgload::load_all()
rmarkdown::render("README.Rmd")Rendering requires Pandoc. If it is not on PATH, set RSTUDIO_PANDOC to its
containing directory or use rmarkdown::find_pandoc(dir = ...) for the local
installation. Review generated diffs before committing.
For a full check, run these commands from a temporary output directory,
substituting the checkout path and the tarball version from DESCRIPTION:
R CMD build --no-manual "/path/to/freqtables"
R CMD check --no-manual freqtables_0.2.0.9000.tar.gzThese commands build and check all six vignettes, examples, and installed
tests; --no-manual skips the PDF reference manual. Keep temporary builds and
check directories outside the repository. New local tarballs and .Rcheck
directories are also ignored if created at the repository root.
dev/validation.md and
dev/contingency-validation.md, with their adjacent
check logs, record the checks at each implementation milestone. Their handoff
sections describe the state at that time, not the current Git status.
CRAN-SUBMISSION and cran-comments.md at the package root belong to the
0.1.1 release cycle. Refresh release metadata and check results before the next
submission. The root .travis.yml is the existing CI configuration; local
validation commands above can be run independently of that service.