← Back to all sparks
R

rstantools

ANALYTICS
Velocity2.5

Tools for Developing R Packages Interfacing with Stan

The scaffolding layer for Stan-backed R packages, maintained rather than extended.

stanbayesianr-packagebuild-toolingcompatibility
Current state
rstantools generates and maintains the build infrastructure that lets an R package ship Stan models — the inst/stan layout, the auto-generated C++, the Rcpp module loading, and the posterior_* generics downstream packages implement. Its releases are dominated by keeping that scaffolding compiling as Stan, StanHeaders, and rstan move underneath it. Version 2.7.0 continues that pattern, its one user-facing change being an allowance for deprecated syntax in specified versions of specified packages.
Where it's heading
This is a stable dependency in maintenance mode, and the release history reads accordingly: compatibility shims for new rstan and Stan RNG versions, C++ standard bumps, and pkgdown housekeeping. The last substantive API growth was 2.5.0's loo_epred() generic and discrete-data loo_pit(). Contributor churn is visible in recent releases, with several first-time contributors handling infrastructure rather than statistics.
Prediction
Expect the next releases to continue tracking Stan and rstan breakage as it arrives; nothing in the recent entries points to new generics or a change in the package-generation model.

Recent moves

  1. 19d ago

    Deprecated syntax allowed for pinned package versions

    The one change downstream maintainers will notice is an allowance for deprecated syntax in specified versions of specified packages, which keeps older Stan-backed packages building without an immediate rewrite. The rest is contribution policy, a dependabot bump, and pkgdown workflow fixes.

    View source ↗
  2. 7mo ago

    pkgdown theme refresh, C++14 dropped from SystemRequirements

    Documentation site theming, a stale C++14 SystemRequirements declaration removed, and a fix so an error no longer opens the project. No change to generated package structure.

    View source ↗
  3. 11mo ago

    loo_epred() generic added, loo_pit() extended to discrete data

    The most substantive API growth in recent history: a new loo_epred() generic and loo_pit() extended for discrete data, both part of the posterior-prediction vocabulary downstream packages implement. Also fixes a 2.4.0 regression in compiling packages with custom Stan functions.

    View source ↗
  4. 2y ago

    Standalone Stan functions fixed for rstan 2.33+

    A compatibility release restoring builds for packages that ship standalone Stan functions under rstan 2.33 and later, plus template imports that suppress R CMD check NOTEs. Typical of how this package responds to upstream Stan changes.

    View source ↗
  5. 3y ago

    init_cpp deprecated, standalone-function bugfix under Stan 2.31

    Deprecates init_cpp, fixes standalone functions under Stan 2.31, and limits Makevars generation to the current platform. Housekeeping against a moving upstream.

    View source ↗
  6. 3y ago

    C++17 standard adopted, standalone function export reworked

    Moves generated packages to C++17 and reworks how standalone Stan functions are exported for StanHeaders and rstan 2.26 onward. A toolchain floor change that downstream packages inherit whether or not they touch their own code.

    View source ↗