R Observatory
Search

Probability Distributions with Certain or Uncertain Parameters

install.packages("distspec")
CRAN 30-day downloads, method
311−30.6% down on the 30 days before, the worse direction
Test coverage, method
88%of lines run by tests

Represents probability distributions with fixed or potentially uncertain parameters, with tools to discretise, convolve, sample from and summarise them.

Maintainer
Sebastian Funk
Latest release
12 Oct 2026
First release
7 Aug 2026 (first seen)

Compare with another package

More details
Releases
3
Needs compilation
No
Needs R
>= 3.5.0
Language
en-GB
RoxygenNote
7.3.3
Subjects (1) Method, Subjects
Cite

Package

Run in R for the authors' preferred citation:

citation("distspec")
APA
Funk, S., Abbott, S., & Azam, J. M. (2026). distspec: Probability Distributions with Certain or Uncertain Parameters (Version 0.3.0) [Computer software]. https://doi.org/10.32614/CRAN.package.distspec
About

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

The repository also keeps a CITATION.cff.

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 distspec version 0.3.0 [Data set]. HJJB, LLC. Data release v2026-10-28. https://doi.org/10.5281/zenodo.21843040
About

From data release v2026-10-28, which the citation names so these numbers can be found later.

All 13 check platforms pass.

  • r-devel-linux-x86_64-debian-clang

    The unreleased R on Linux, x86_64, debian-clang

    OK

    Version checked
    0.3.0
    Time taken
    84 s
  • r-devel-linux-x86_64-debian-gcc

    The unreleased R on Linux, x86_64, debian-gcc

    OK

    Version checked
    0.3.0
    Time taken
    59 s
  • r-devel-linux-x86_64-fedora-clang

    The unreleased R on Linux, x86_64, fedora-clang

    OK

    Version checked
    0.3.0
    Time taken
    54 s
  • r-devel-linux-x86_64-fedora-gcc

    The unreleased R on Linux, x86_64, fedora-gcc

    OK

    Version checked
    0.3.0
    Time taken
    58 s
  • r-devel-windows-x86_64

    The unreleased R on Windows, x86_64

    OK

    Version checked
    0.3.0
    Time taken
    106 s
  • r-oldrel-macos-arm64

    The previous release of R on macOS, arm64

    OK

    Version checked
    0.3.0
    Time taken
    35 s
  • r-oldrel-macos-x86_64

    The previous release of R on macOS, x86_64

    OK

    Version checked
    0.3.0
    Time taken
    90 s
  • r-oldrel-windows-x86_64

    The previous release of R on Windows, x86_64

    OK

    Version checked
    0.3.0
    Time taken
    125 s
  • r-patched-linux-x86_64

    The patched release of R on Linux, x86_64

    OK

    Version checked
    0.3.0
    Time taken
    78 s
  • r-release-linux-x86_64

    The current release of R on Linux, x86_64

    OK

    Version checked
    0.3.0
    Time taken
    76 s
  • r-release-macos-arm64

    The current release of R on macOS, arm64

    OK

    Version checked
    0.3.0
    Time taken
    25 s
  • r-release-macos-x86_64

    The current release of R on macOS, x86_64

    OK

    Version checked
    0.3.0
    Time taken
    89 s
  • r-release-windows-x86_64

    The current release of R on Windows, x86_64

    OK

    Version checked
    0.3.0
    Time taken
    107 s
  • 13 OK

Check results on CRAN

Total downloads in the last 30 days
323−31.3% down on the 30 days before, the worse directionIt is the sum of 3 channels: CRAN, r2u and autoCRAN.

CRAN rank

12,916 of 26,530

CRAN

311 downloads in the last 30 days

Rank
12,916 of 26,530
Change
−30.6% down on the 30 days before, the worse direction

It is in the total. Take it out

r2u

8 downloads in the last 30 days

Rank
7,389 of 30,526
Change
−27.3% down on the 30 days before, the worse direction

It is in the total. Take it out

autoCRAN

4 downloads in the last 30 days

Rank
13,992 of 29,212
Change
−63.6% down on the 30 days before, the worse direction

It is in the total. Take it out

Over time

Compare downloads

Needs
8
Dependent packages
0
Suggested by
1
Needs (8)
Installing it adds
5 packages, 2.6 MB of source
Of those, need compilation
3
Optional extras (6)
Functions
158
Public exports
32
Lines of R code
3,307
Median complexity
1
Functions (158)
Size and composition

Lines by kind (7,282)

KindLinesShare
R code3,30745%
Tests1,80925%
Documentation2,01028%
Guides1562%

Lines by language

LanguageLinesShare
R5,11670%
Rd2,01028%
Vignettes1562%

Languages are counted from file extensions.

Files
115
R functions
158
Object systems
S3: 100 methods
Deprecated functions
2
Complexity
Median
1
Mean
2.39
Highest
28
Median lines per function
4
About complexity

Cyclomatic complexity counts the independent paths through a function: 1 is a straight line, higher is harder to test. R functions only.

Call graph figures
R functions
158
Calls
140
Unconnected
76
Groups
4
Growth (3 releases)
Total lines by release
5,939 on 7 Aug 20267,282 on 12 Oct 2026
Release changes

The tests ran and coverage was measured.

Lines run by tests
88.3%
Expressions run by tests
92.3%
Test cases
157
Exports named in tests
90.6%
Coverage by file (19)
Coverage run
Lines counted
1,124
Lines the tests ran
992
Tests passed
Yes
Measured with
covr 3.6.5 on R 4.6.1
Test suite
Has tests
Yes
Test frameworks
testthat
Test cases
157
Lines of tests
1,809
Test lines per line of code
0.55
Exports documented
100%
Arguments documented
82.2%
Return value documented
100%
Help pages with examples
65.5%
Examples run in checks
100%
Guides (1)
Other documentation
README
Yes, 354 words
Release notes file
Yes
Help pages
58
Lines of documentation
2,010

epiforecasts / distspec on github.com

Stars
1
Forks
2
Open issues
2
Last commit
12 Oct 2026
Activity
Commits
204
Open pull requests
2
Tagged releases
1
Latest tagged release
v0.2.0, 1 Sep 2026
Issues closed in
1 day (median)
Pull requests closed in
0 days (median)
Pull requests merged
87%
Created
7 Oct 2024
Licence file reads as
–
Development practices (17)
KindFound
Continuous integrationGitHub Actions, R CMD check workflow
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Governance and communityCode of conduct, Contributing guide, Issue templates, PR template
Docs sourceREADME.Rmd, pkgdown
GitHub Pages site last deployed 2026-10-12
The repository has a site deploy workflow
pkgdown site last built 2026-10-12
CoverageCoverage reporting (Codecov)
Reproducibility and dev environmentdata-raw/
CRAN release processcran-comments.md
Research and citationCITATION.cff
Automation and maintenanceDependabot
Lint, format, editorlintr, Lint workflow

Method, repository practices

Across epiforecasts

Tools

ToolFirst seenFoundCommits crediting it
Claude Code24 Nov 2025Named in .Rbuildignore.claude1 at least
  • Named in .Rbuildignore

Across epiforecasts

R releases
  • On CRAN
  • Release
VersionReleasedR
0.3.0 current12 Oct 20264.6.1
0.2.01 Sep 20264.6.1
0.1.07 Aug 2026 first seen4.6.1
Release notes (0.3.0)

New features

  • Exported dist_cdf() and added dist_quantile(), so packages built on distspec can look up a distribution's CDF and quantile functions directly instead of reimplementing per-family dispatch.
  • Added quantile.dist_spec() and cdf(), truncation-aware quantile and cumulative distribution functions for a <dist_spec> with fixed parameters; both respect a max/cdf_max bound set with bound_dist() and give every quantile/CDF value of a Fixed() distribution its point-mass value. Each raises an informative error for a distribution with uncertain parameters, or one with no analytic CDF (e.g. NonParametric()). A composite (multi-component) distribution returns one set of values per component, in keeping with mean()/sd().

Bug fixes

  • sample_dist() now respects a distribution's max and cdf_max bounds instead of sampling from the unbounded distribution; samples are drawn exactly via inverse-CDF sampling on the truncated range, computed on the log scale so that a bound deep in the lower tail (where the CDF underflows to zero in double precision) still samples correctly. This also fixes bounded sampling of a component within a composite (multi-dist_spec) distribution and lets cdf_max apply to Beta(). Sampling a composite that has a max/cdf_max of its own now raises an informative error, since such a bound constrains the sum of the components, which has no closed-form distribution to sample from.
  • sample_dist() of a composite distribution now returns an n by k matrix for n = 1 as documented; previously it returned a length-k vector, so the documented rowSums() idiom errored.