The rstantools package provides tools for developing R packages interfacing with Stan. The package vignettes provides guidelines and recommendations for developers as well as a demonstration of creating a working package with a pre-compiled Stan program.
-
Guidelines for Developers of R Packages Interfacing with Stan
-
Step by step guide for creating a package that depends on RStan
- mc-stan.org/rstantools (online documentation, vignettes)
- Ask a question (Stan Forums on Discourse)
- Open an issue (GitHub issues for bug reports, feature requests)
- Install from CRAN:
install.packages("rstantools")
- Install latest development version from GitHub (requires devtools package):
if (!require("devtools")) {
install.packages("devtools")
}
devtools::install_github("stan-dev/rstantools", build_vignettes = TRUE)