Skip to content

rstan

2.32.7Package record

R Interface to Stan

206packages dependsuggested by 65
11.4Mdownloads / year
15.3%test coverage
8/13flavors OK

Overview

About

User-facing R functions are provided to parse, compile, test, estimate, and analyze Stan models by accessing the header-only Stan library provided by the 'StanHeaders' package. The Stan project develops a probabilistic programming language that implements full Bayesian statistical inference via Markov Chain Monte Carlo, rough Bayesian inference via 'variational' approximation, and (optionally penalized) maximum likelihood estimation via optimization. In all three cases, automatic differentiation is used to quickly and accurately evaluate gradients without burdening the user with the need to derive the partial derivatives.

Install

Health

CRAN checks
5NOTE8OK
Check messages
NOTER code for possible problemsr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64
Found calls to structure() using deprecated special names:
  rstan/tests/testthat/test-misc_inst.R (.Dim: 1)
'.Dim' should be changed to 'dim'.

CRAN check page ↗

Slowest check: 16.3 min · r-oldrel-macos-x86_64
Status changes
  • NOTE8 OK, 5 NOTENow
  • NOTE11 OK, 2 NOTE2026-07-16
  • OK13 OK2026-06-08
  • WARNING12 OK, 1 WARNING2026-06-07
  • OK12 OK2026-04-25
  • NOTE11 OK, 3 NOTE2026-04-22
Show 2 earlier changesHide 2 earlier changes
  • ERROR10 OK, 3 NOTE, 1 ERROR2026-04-18
  • NOTE11 OK, 3 NOTE2026-03-10
Advisories

none known

Documentation

In release 2.32.7
READMENoVignettesYes · 4 · dynamicNEWSYes · 33% structuredCitation fileYes · computed when R runs itWebsiteYes · pkgdown
Help pages
44 (1 internal)includes a package overview page
Examples that run
47%17 run in a plain check · 19 never run
Exported functions with examples
79%
Documented parameters
90%
Return-value docs
86%
Help pages citing references
41%

Downloads

11.4M
CRAN downloads in the past year
Rank #42 · ~31.2K/day · ~948.7K/mo
Daily download trend is not available in this view yet.
902.3K30 days
3.5M90 days
11.4M1 year
Compare downloads with other packages →
Also on17.4K r2u102 autocran27K conda_forge1.1K c2d4u

Repository

1,087Stars
266Forks
346Open issues
12Open PRs
11Releases
4,255Commits
81Commit identities
stanmcmcbayesian-inferencebayesian-data-analysisbayesian-statisticsrr-package
4,255 commits · Last activity 2026-10-19 · +0.2% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
84%
Median days to close, 50 most recently updated closed issues
4
Median days to close, 50 most recently updated closed PRs
1

Stars over time

2025-10-19 · 1,0572026-10-01 · 1,087
PracticesBeta

11 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/stan-dev/rstan on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (4)
Issue templatesPR templateFunding

Funding links: GitHub Sponsors, mc-stan.org

The repository owner accepts GitHub Sponsors

Docs source (2)

GitHub Pages site last deployed 2026-10-17 · The repository has a site deploy workflow

pkgdown site last built 2025-12-10

CRAN release process (1)
revdep/
Show all practicesHide 2 practices
Automation and maintenance (1)
Dependabot
Git structural (1)
Submodules
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
23 external dependencies (excludes base and recommended)

Installing rstan adds 46 packages (21 with compiled code, 41 MB of source tarballs). Heaviest: BH 14 MB, ggplot2 6.0 MB, loo 2.7 MB.

Depends (2)
R >= 3.4.0StanHeaders
Enhances (0)
none

People & History

People (18)
Maintainer since 2.7.0-1 (2015), Author
Author · added in 2.26.23
Author · added in 2.8.0
Author · added in 2.26.23
Author · added in 2.21.1
Contributor
Contributor · added in 2.18.1
Contributor · added in 2.8.0
Contributor · added in 2.21.2
Copyright holder · added in 2.21.1
gamma.hpp
Copyright holder · added in 2.21.1
gamma.hpp
Copyright holder · added in 2.10.1
Copyright holder · added in 2.10.1
R/pairs.R, R/dynGet.R
Copyright holder · added in 2.21.1
gamma.hpp
Copyright holder · added in 2.21.1
gamma.hpp
Copyright holder · added in 2.10.1
R/pairs.R
Copyright holder · added in 2.10.1
R/cxxfunplus.R
Listed in earlier versions (5)
Show 5 peopleHide 5 people
John Fletcher
no longer listed · 2.7.0-1 to 2.17.4
Thomas Heller
no longer listed · 2.7.0-1 to 2.17.4
Eric Niebler
no longer listed · 2.7.0-1 to 2.17.4
Joel de Guzman
no longer listed · 2.7.0-1 to 2.17.4
no longer listed · 2.10.1 to 2.18.1
Releases (32)

Pick two releases to compare their code metrics.

Show 28 earlier eventsHide 28 earlier events
  • 2.21.1
    record
    2020-07-08 · diff ↗ ·
    added 1 export
    loo_moment_match
  • R
    R 4.0.0 released · 2020-04-24
  • 2.19.3
    record
    2020-02-11 · diff ↗
  • 2.19.2
    record
    2019-07-09 · diff ↗ ·
    added 4 exports
    sbc, Rhat, ess_bulk, ess_tail
  • R
    R 3.6.0 released · 2019-04-26
  • 2.18.2
    record
    2018-11-07 · diff ↗
  • 2.18.1
    record
    2018-10-16 · diff ↗ ·
    added 12 exports
    get_divergent_iterations, get_max_treedepth_iterations, get_num_leapfrog_per_iteration, get_num_divergent, get_num_max_treedepth, get_bfmi, get_low_bfmi_chains, get_rng, get_stream, RNG, OUT, loo
  • 2.17.4
    record
    2018-10-01 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • 2.17.3
    record
    2018-01-20 · diff ↗
  • 2.17.2
    record
    2017-12-21 · diff ↗ ·
    added 4 exports
    check_hmc_diagnostics, check_divergences, check_treedepth, check_energy
  • 2.16.2
    record
    2017-07-03 · diff ↗
  • R
    R 3.4.0 released · 2017-04-21
  • 2.15.1
    record
    2017-04-19 · diff ↗
  • 2.14.2
    record
    2017-03-19 · diff ↗
  • 2.14.1
    record
    2016-12-28 · diff ↗
  • 2.13.2
    record
    2016-12-18 · diff ↗
  • 2.12.1
    record
    2016-09-12 · diff ↗
  • 2.11.1
    record
    2016-07-29 · diff ↗
  • 2.10.1
    record
    2016-06-24 · diff ↗
  • R
    R 3.3.0 released · 2016-05-03
  • 2.9.0-3
    record
    2016-02-12 · diff ↗
  • 2.9.0
    record
    2016-01-05 · diff ↗
  • 2.8.2
    record
    2015-11-27 · diff ↗
  • 2.8.1
    record
    2015-11-19 · diff ↗ ·
    added 3 exports
    stanc_builder, rstan.package.skeleton, cpp_object_initializer
  • 2.8.0
    record
    2015-09-19 · diff ↗ ·
    added 15 exports
    stan_plot, stan_trace, stan_hist, stan_dens, stan_scat, stan_ac, stan_diag, stan_par, stan_rhat, stan_ess, stan_mcse, rstan_gg_options, rstan_ggtheme_options, quietgg, extract_sparse_parts
  • 2.7.0-1
    record
    2015-07-18
  • R
    R 3.2.0 released · 2015-04-16

Package metadata

First published
2015-07-18
Total releases
32 / 11 yrs
License
GPL (>= 3) OSI
Minimum R
≥ 3.4.0
Download size
1.5 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("rstan")

The package provides a citation file that builds its entry when R runs it. Run citation() to see it.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for rstan version 2.32.7 [Data set]. HJJB, LLC. Data release v2026-10-21. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy