Tools for Developing R Packages Interfacing with 'Stan'

Provides various tools for developers of R packages interfacing with 'Stan' <>, including functions to set up the required package structure, S3 generics and default methods to unify function naming across 'Stan'-based R packages, and vignettes with recommendations for developers.


rstantools 1.4.0

(Github issue/PR numbers in parentheses)

  • Update rstan_package_skeleton to correspond to rstanarm 2.17.2.

rstantools 1.3.0

(Github issue/PR numbers in parentheses)

  • Add bayes_R2 generic and default method. (#8)

rstantools 1.2.1

(Github issue/PR numbers in parentheses)

  • Add init_cpp function for generating src/init.cpp in order to pass R CMD check in R 3.4.x. rstan_package_skeleton calls init_cpp internally. (#6)

rstantools 1.2.0

(Github issue/PR numbers in parentheses)

  • Minor fixes to rstan_package_skeleton for better Windows compatibility. (#1, #2)
  • Fix some typos in the developer guidelines vignette. (#3, #4)
  • Add loo_predict, loo_linpred, and loo_predictive_interval generics in preparation for adding methods to the rstanarm package. (#5)

rstantools 1.1.0

Changes to rstan_package_skeleton:

  • Add comment in Read-and-delete-me about importing all of Rcpp and methods packages.
  • Include methods in Depends field of DESCRIPTION file.
  • Also download rstanarm's file.

rstantools 1.0.0

  • Initial CRAN release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.5.0 by Jonah Gabry, a month ago,

Report a bug at

Browse source code at

Authors: Jonah Gabry [aut, cre], Ben Goodrich [aut], Stefan Siegert [ctb], Trustees of Columbia University [cph]

Documentation:   PDF Manual  

GPL (>= 3) license

Imports stats, utils

Suggests bayesplot, rstan, rstanarm, shinystan, loo, testthat, covr, knitr, devtools, roxygen2, rmarkdown, rstudioapi, usethis

Imported by beanz, brms, hBayesDM, idealstan, rstanarm, trialr.

Depended on by bayesLopod.

Suggested by bayesplot, ggeffects, loo, rstan.

See at CRAN