Skip to content

StanHeaders

C++ Header Files for Stan

v2.32.10 · Jul 15, 2024 · BSD_3_clause + file LICENSE

Description

The C++ header files of the Stan project are provided by this package, but it contains little R code or documentation. The main reference is the vignette. There is a shared object containing part of the 'CVODES' library, but its functionality is not accessible from R. 'StanHeaders' is primarily useful for developers who want to utilize the 'LinkingTo' directive of their package's DESCRIPTION file to build on the Stan library without incurring unnecessary dependencies. The Stan project develops a probabilistic programming language that implements full or approximate Bayesian statistical inference via Markov Chain Monte Carlo or 'variational' methods and implements (optionally penalized) maximum likelihood estimation via optimization. The Stan library includes an advanced automatic differentiation scheme, 'templated' statistical and linear algebra functions that can handle the automatically 'differentiable' scalar types (and doubles, 'ints', etc.), and a parser for the Stan language. The 'rstan' package provides user-facing R functions to parse, compile, test, estimate, and analyze Stan models.

Downloads

CRAN

1.4M

Last 30 days

28th

2.7M

Last 90 days

7M

Last year

Trend: +89.8% (30d vs prior 30d)

r2u CRAN

1.7K

Last 30 days

4.8K

Last 90 days

14.4K

Last year

Trend: +5.8% (30d vs prior 30d)

autoCRAN

29

Last 7 days

141

Last 30 days

8

All-time

⚠ Shared name: this package is also shipped elsewhere on openSUSE, so this count is not exclusive to autoCRAN (it is an upper bound).

conda-forge CRAN

3.2K

Last 30 days

9.7K

Last 90 days

39.4K

Last year

Trend: -5.7% (30d vs prior 30d)

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 12 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 25, 2026
NOTE 11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 22, 2026
NOTE r-oldrel-macos-arm64

installed package size

installed size is 17.0Mb
  sub-directories of 1Mb or more:
    include  11.7Mb
    lib       3.3Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 17.4Mb
  sub-directories of 1Mb or more:
    include  11.7Mb
    lib       3.7Mb
NOTE r-oldrel-windows-x86_64

installed package size

installed size is 14.1Mb
  sub-directories of 1Mb or more:
    include  11.3Mb
ERROR 10 OK · 3 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Apr 18, 2026
ERROR r-devel-windows-x86_64

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building 'stanmath.Rmd' using rmarkdown

Quitting from stanmath.Rmd:66-68 [unnamed-chunk-1]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_er
...[truncated]...
ng vignette 'stanmath.Rmd' failed with diagnostics:
Error 1 occurred building shared library.
--- failed re-building 'stanmath.Rmd'

SUMMARY: processing the following file failed:
  'stanmath.Rmd'

Error: Vignette re-building failed.
Execution halted
NOTE r-oldrel-macos-arm64

installed package size

installed size is 17.0Mb
  sub-directories of 1Mb or more:
    include  11.7Mb
    lib       3.3Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 17.4Mb
  sub-directories of 1Mb or more:
    include  11.7Mb
    lib       3.7Mb
NOTE r-oldrel-windows-x86_64

installed package size

installed size is 14.1Mb
  sub-directories of 1Mb or more:
    include  11.3Mb
NOTE 11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
NOTE r-oldrel-macos-arm64

installed package size

installed size is 17.0Mb
  sub-directories of 1Mb or more:
    include  11.7Mb
    lib       3.3Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 17.4Mb
  sub-directories of 1Mb or more:
    include  11.7Mb
    lib       3.7Mb
NOTE r-oldrel-windows-x86_64

installed package size

installed size is 14.1Mb
  sub-directories of 1Mb or more:
    include  11.3Mb

Code

Structure

Lines of code

163,773

Files

2,356

Compiled share

99.5%

Has compiled src

Yes

Language breakdown

R 139 (0.1%)C/C++/src 162,930 (99.5%)Tests 6 (0%)Docs 139 (0.1%)Vignettes 559 (0.3%)

API

Exported functions

1

Internal functions

2

Recent export changes

v2.7.0+1 pattern:^[[:alpha:]]+  −1 pattern:.
v2.6.0-10+1 pattern:.

Testing & CI

Has tests

Yes

Test-to-code ratio

0.04

testthat edition

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

100%

\dontrun example ratio

0%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

No

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

33.3%

Unsafe pattern score

0

Dep constraint coverage

100%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

3.4.0

System requirements

2

C++ standard

C++17

License

BSD_3_clause + file LICENSE

License flags

SPDX valid, OSI approved

History

Versions

37

First release

2015-02-10

Latest release

2024-07-15

Avg cadence

65 days

Cold removal rate

100%

Dep drift

1

LOC over versions

v2.7.0: 42 LOCv2.8.0: 42 LOCv2.9.0: 42 LOCv2.10.0: 47,351 LOCv2.10.0-2: 47,351 LOCv2.11.0: 47,351 LOCv2.12.0: 47,351 LOCv2.12.0-1: 47,351 LOCv2.13.1: 41,793 LOCv2.14.0: 41,793 LOCv2.14.0-1: 41,793 LOCv2.15.0-1: 41,741 LOCv2.16.0-1: 41,812 LOCv2.17.1: 41,812 LOCv2.17.2: 41,812 LOCv2.18.0: 67,114 LOCv2.18.0-1: 67,114 LOCv2.18.1: 67,123 LOCv2.18.1-10: 84,934 LOCv2.19.0: 84,934 LOCv2.21.0-1: 93,644 LOCv2.19.2: 84,933 LOCv2.21.0-3: 93,646 LOCv2.21.0-5: 93,646 LOCv2.21.0-6: 93,823 LOCv2.21.0-7: 93,845 LOCv2.26.25: 158,052 LOCv2.26.26: 158,052 LOCv2.26.27: 158,049 LOCv2.26.28: 158,052 LOCv2.32.5: 163,773 LOCv2.32.6: 163,773 LOCv2.32.7: 163,773 LOCv2.32.8: 163,773 LOCv2.32.9: 163,773 LOCv2.32.10: 163,773 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Reverse Dependencies (146)

depends

Dependency Network

Dependencies Reverse dependencies RcppParallel bayesvl rstan SMNlmec modeltime prophet AovBay BINtools BPrinStratTTE BRRAT BayesGmed BayesGrowth BayesPET BayesSenMC BayesianPlatformDesignTimeTrend BeeGUTS +131 more reverse deps StanHeaders

Version History

38 tracked
new 2.32.10 Mar 10, 2026
updated 2.32.10 ← 2.32.9 diff Jul 14, 2024
updated 2.32.9 ← 2.32.8 diff May 28, 2024
updated 2.32.8 ← 2.32.7 diff May 20, 2024
updated 2.32.7 ← 2.32.6 diff Apr 24, 2024
updated 2.32.6 ← 2.32.5 diff Feb 29, 2024
updated 2.32.5 ← 2.26.28 diff Jan 9, 2024
updated 2.26.28 ← 2.26.27 diff Sep 6, 2023
updated 2.26.27 ← 2.26.26 diff Jun 14, 2023
updated 2.26.26 ← 2.26.25 diff May 30, 2023
updated 2.26.25 ← 2.21.0-7 diff May 16, 2023
updated 2.21.0-7 ← 2.21.0-6 diff Dec 16, 2020
updated 2.21.0-6 ← 2.21.0-5 diff Aug 15, 2020
updated 2.21.0-5 ← 2.21.0-3 diff Jun 8, 2020
updated 2.21.0-3 ← 2.19.2 diff May 27, 2020