Learn R Programming

rstantools (version 2.7.0)

Tools for Developing R Packages Interfacing with 'Stan'

Description

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.

Copy Link

Version

Install

install.packages('rstantools')

Monthly Downloads

335,960

Version

2.7.0

License

GPL (>= 3)

Maintainer

Andrew Johnson

Last Published

July 26th, 2026

Functions in rstantools (2.7.0)

rstantools-package

Tools for Developing R Packages Interfacing with Stan
use_rstan

Add Stan infrastructure to an existing package
rstan_config

Configure system files for compiling Stan source code
rstantools_load_code

Helper function for loading code in roxygenise
loo-prediction

Generic functions for LOO predictions
log_lik

Generic function for pointwise log-likelihood
posterior_linpred

Generic function for accessing the posterior distribution of the linear predictor
posterior_interval

Generic function and default method for posterior uncertainty intervals
predictive_error

Generic function and default method for predictive errors
posterior_predict

Generic function for drawing from the posterior predictive distribution
bayes_R2

Generic function and default method for Bayesian R-squared
init_cpp

Register functions implemented in C++
posterior_epred

Generic function for accessing the posterior distribution of the conditional expectation
nsamples

Generic function for extracting the number of posterior samples
predictive_interval

Generic function for predictive intervals
rstan_create_package

Create a new R package with compiled Stan programs
prior_summary

Generic function for extracting information about prior distributions