Skip to content

rstan

2.32.7

R Interface to Stan

254packages depend
8Mdownloads / year
15.3%test coverage
9/13checks pass

Overview

About
Maintained by Ben GoodrichFirst published 2015-07-1832 releasesCRAN page ↗GitHub ↗

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
4NOTE9OK
Failing flavors
  • NOTE r-devel-linux-x86_64-debian-clang
  • NOTE r-devel-linux-x86_64-debian-gcc
  • NOTE r-devel-linux-x86_64-fedora-gcc
  • NOTE r-devel-windows-x86_64
Slowest check: 16.3 min · r-oldrel-macos-x86_64
Code health
Yes
Tests · ratio 0.41
15.3%
Coverage · measured lines
100%
Documentation · exports
11
Dependencies · direct
Check history
  • NOTE2026-07-16
    11 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-06-08
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • WARNING2026-06-07
    12 OK · 0 NOTE · 1 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-04-25
    12 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-04-22
    11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Show 2 earlier snapshots
  • ERROR2026-04-18
    10 OK · 3 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • NOTE2026-03-10
    11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMENoVignettesYes · dynamicpkgdown siteNoNEWSNoCode of conductNoContributing guideNo
Examples that run
51%
Documented parameters
90%
Return-value docs
86%
References docs
41%

Downloads

8M
CRAN downloads in the past year
Rank #47 · ~22K/day · ~668.1K/mo
Daily download trend is not available in this view yet.
1.4M30 days
3.4M90 days
8M1 year
Compare downloads with other packages →
Also on13.8K r2u122 autocran21.2K conda_forge498 c2d4u

Repository

Repository
1,080Stars
270Forks
344Open issues
12Open PRs
11Releases
4,156Commits
81Contributors
stanmcmcbayesian-inferencebayesian-data-analysisbayesian-statisticsrr-package
4,156 commits · Last activity 2026-07-22 · +0.2% stars, 30d

Stars over time

2025-06-10 · 1,0512026-07-07 · 1,080

Repository practices

Upstream repositoryBeta

7 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/stan-dev/rstan on 2026-07-19.

Continuous integration (1)
GitHub Actions
CRAN release process (1)
revdep/
Automation and maintenance (1)
Dependabot
Governance and community (3)
Issue templatesPR templateFunding
Show all practices
Git structural (1)
Submodules
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
23 external dependencies (excludes base and recommended)
Depends (2)
R >= 3.4.0StanHeaders
Enhances (0)
none

Code & Tests

Code Composition
R 11,203 (52%)Rd 4,332 (20%)C++ 2,478 (11%)Other 2,275 (11%)Vignettes 1,258 (6%)Stan 18 (0%)
Code characteristics
Object systems
S315S4 class3S4 generic28S4 method35
Cyclomatic complexity
2.0 median / 89 max
Test cases
58 / 0.41 per code line
System requirements
2 external

Test coverage

Line coverage

15%

Expression

16.0%

Tests / Examples

15.3% / 17% ex

Functions

359 50 exported

Complexity

4.7 avg / 89 max

Call network

359 nodes / 365 edges

Loading call graph…

Lowest coverage

359 functions
FunctionCycloCoverage
As.mcmc.list exp30%
Rhat exp10%
check_divergences exp20%
check_energy exp20%
check_hmc_diagnostics exp10%
check_treedepth exp20%

People & History

People (18)
Maintainer (1)
Maintainer, Author
Authors (6)
Maintainer, 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
Contributors (4)
Contributor
Contributor · added in 2.18.1
Contributor · added in 2.8.0
Contributor · added in 2.21.2
Copyright holders (8)
Copyright holder · added in 2.21.1
Copyright holder · added in 2.21.1
Copyright holder · added in 2.10.1
Copyright holder · added in 2.10.1
Copyright holder · added in 2.21.1
Copyright holder · added in 2.21.1
Copyright holder · added in 2.10.1
Copyright holder · added in 2.10.1
Listed in earlier versions (5)
no longer listed · 2.7.0-1 to 2.17.4
no longer listed · 2.7.0-1 to 2.17.4
no longer listed · 2.7.0-1 to 2.17.4
no longer listed · 2.7.0-1 to 2.17.4
no longer listed · 2.10.1 to 2.18.1
Package Timeline

32 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • 2.32.7Latest
    2025-03-10 · current release · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 2.32.6
    2024-03-05 · diff ↗
  • 2.32.5
    2024-01-10 · diff ↗
  • 2.32.3
    2023-10-15 · diff ↗
  • 2.26.23
    2023-09-08 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • 2.21.8
    2023-01-17 · diff ↗
  • 2.21.7
    2022-09-08 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • 2.21.5
    2022-04-11 · diff ↗
  • 2.21.3
    2021-12-20 · diff ↗
  • R
    R 4.1.0 released · 2021-05-18
  • 2.21.2
    2020-07-27 · diff ↗
Show 28 earlier events
  • 2.21.1
    2020-07-08 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 2.19.3
    2020-02-11 · diff ↗
  • 2.19.2
    2019-07-09 · diff ↗
  • R
    R 3.6.0 released · 2019-04-26
  • 2.18.2
    2018-11-07 · diff ↗
  • 2.18.1
    2018-10-16 · diff ↗
  • 2.17.4
    2018-10-01 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • 2.17.3
    2018-01-20 · diff ↗
  • 2.17.2
    2017-12-21 · diff ↗
  • 2.16.2
    2017-07-03 · diff ↗
  • R
    R 3.4.0 released · 2017-04-21
  • 2.15.1
    2017-04-19 · diff ↗
  • 2.14.2
    2017-03-19 · diff ↗
  • 2.14.1
    2016-12-28 · diff ↗
  • 2.13.2
    2016-12-18 · diff ↗
  • 2.12.1
    2016-09-12 · diff ↗
  • 2.11.1
    2016-07-29 · diff ↗
  • 2.10.1
    2016-06-24 · diff ↗
  • R
    R 3.3.0 released · 2016-05-03
  • 2.9.0-3
    2016-02-12 · diff ↗
  • 2.9.0
    2016-01-05 · diff ↗
  • 2.8.2
    2015-11-27 · diff ↗
  • 2.8.1
    2015-11-19 · diff ↗
  • 2.8.0
    2015-09-19 · diff ↗
  • 2.7.0-1
    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
Installed size
not tracked yet
With dependencies
not tracked yet
Report a problem with this page →