Skip to content

distributions3

0.3.0Package record

Probability Distributions as S3 Objects

2packages dependsuggested by 4
56.6Kdownloads / year
86.9%test coverage
13/13flavors OK

Overview

About

Tools to create and manipulate probability distributions using S3. Generics pdf(), cdf(), quantile(), and random() provide replacements for base R's d/p/q/r style functions. Functions and arguments have been named carefully to minimize confusion for students in intro stats courses. The documentation for each distribution contains detailed mathematical notes.

Changes in 0.3.0
  • New Empirical() distribution based on a random sample. This is particularly useful when forecasts are represented by samples rather than by parametric distributions (#98 and #120 by Reto Stauffer).
  • New SinhArcsinh() distribution implementing the Sinh-Arcsinh distribution from Jones and Pewsey (2009, Biometrika) (#128 by Reto Stauffer).
  • Fallback methods for all standard distributions3 methods such as cdf(), pdf(), quantile(), random(), and moments such as mean(), variance(), skewness(), and kurtosis(). These leverage those methods that are available but fill the gaps using numerical integration/differentiation (#120 by Reto Stauffer).
  • New generic functions score() and hessian() to compute the score (first derivative of the log-likelihood with respect to the parameters) and Hessian (corresponding second derivative). There are numeric fallback methods for general distribution objects and analytic methods for a few distributions. The hessian() methods should typically have an argument expected which allows to select whether the observed (expected = FALSE) or expected (expected = TRUE) Hessian should be computed. Some methods may only support one or the other specification and throw an error message otherwise (#124 and #128 by Reto Stauffer and Achim Zeileis).
Show all changes in 0.3.0Hide the rest of the changes in 0.3.0
  • All distribution constructor functions such as Poisson() and Binomial() now have default arguments for all distribution parameters. Typically, these new defaults are empty so that for example Poisson() yields a Poisson distribution of length zero. Only those distributions which already previously had a default such as Normal(mu = 0, sigma = 1) yield a distribution of length one (#26 and #129 by Reto Stauffer).
  • Methods for crps() function from the scoringRules package for computing the (continuous) ranked probabiity score of a distribution. This is a useful proper scoring rule as an alternative to the log-likelihood. A numerical fallback method is provided as well (#88 and #120 by Reto Stauffer and Achim Zeileis).
  • Streamline the apply_dpqr() workhorse function to avoid unnecessary computations more carefully (#123 and #125 by Achim Zeileis).
  • Reduce the hard dependencies: ggplot2 is now a "Suggests" dependency and the usage of glue is replaced by base R function sprintf() (#126 and #125 by Achim Zeileis).
  • Avoid using rlang::check_dots_used() multiple times when calling a single method. For generic functions from distributions3, such as cdf() and variance() etc., the call to rlang::check_dots_used() is directly in the generic. For generic functions defined elsewhere, namely quantile() and mean() from base R and crps() from scoringRules, all methods call rlang::check_dots_used() themselves (#127 by Reto Stauffer).

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 7.1 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-18
  • ERROR12 OK, 1 ERROR2026-06-16
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.3.0
READMEYes · 354 wordsVignettesYes · 10 · dynamicNEWSYes · 100% structured · mentions 0.3.0Citation fileNoWebsiteYes · pkgdown
Help pages
262 (4 internal)includes a package overview page
Examples that run
100%209 run in a plain check
Exported functions with examples
98%
Documented parameters
94%
Return-value docs
80%
Help pages citing references
1%

Downloads

56.6K
CRAN downloads in the past year
Rank #1,832 · ~155/day · ~4.7K/mo
Daily download trend is not available in this view yet.
3.5K30 days
10.9K90 days
56.6K1 year
Compare downloads with other packages →
Also on618 r2u5 autocran1.6K conda_forge83 c2d4u

Repository

107Stars
17Forks
12Open issues
1Open PRs
7Releases
384Commits
17Commit identities
384 commits · Last activity 2026-10-16 · Default branch at 0.3.0.99, ahead of CRAN 0.3.0 (checked 2026-10-18)
Responsiveness
How these are sampled
PRs merged (all time)
88%
Median days to close, 50 most recently updated closed issues
399
Median days to close, 50 most recently updated closed PRs
1

Stars over time

2025-08-31 · 1042026-07-22 · 107
PracticesBeta

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

Checks run against github.com/zeileis/distributions3 on 2026-10-18.

Continuous integration (1)
GitHub Actions
Governance and community (2)
Code of conductContributing guide
Docs source (4)
README.Rmdpkgdown

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

pkgdown site last built 2026-08-26

Coverage (1)
Coverage reporting (Codecov)
Show all practicesHide 3 practices
Reproducibility and dev environment (1)
Makefile
CRAN release process (1)
cran-comments.md
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
13 external dependencies (excludes base and recommended)

Installing distributions3 adds 1 package (1 with compiled code, 766 KB of source tarballs). Heaviest: rlang 766 KB.

Depends (1)
R >= 3.0.2
Imports (1)
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
2direct
3indirect
Depends 1 · Imports 1
Suggested by 4
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

Datasets

People & History

People (10)
Author, Maintainer since 0.2.4 (2026) · added in 0.2.0
Author
Author · added in 0.2.0
Author · added in 0.1.2
Author · added in 0.3.0
Contributor · added in 0.1.2
Contributor
Contributor

Previously maintained by Alex Hayes (0.1.1 to 0.2.3).

Listed in earlier versions (1)
Lang
no longer listed · 0.2.4 to 0.3.0
Releases (8)

Pick two releases to compare their code metrics.

  • 0.3.0Latest
    record
    2026-07-22 · current release · diff ↗ ·
    added 15 exports
    Empirical, SinhArcsinh, crps.distribution, dempirical, distribution_calculate_moments, dsinharcsinh, hessian, pempirical, psinharcsinh, qempirical, qsinharcsinh, random.distribution, rempirical, rsinharcsinh, score
  • 0.2.4
    record
    2026-07-22 · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 0.2.3
    record
    2025-09-12 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 0.2.2
    record
    2024-09-16 · diff ↗ ·
    added 2 exports
    PoissonBinomial, simulate.default
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • 0.2.1
    record
    2022-09-07 · diff ↗ ·
    added 22 exports
    HurdleNegativeBinomial, ZINegativeBinomial, ZTNegativeBinomial, ZTPoisson, dhnbinom, dzinbinom, dztnbinom, dztpois, is_continuous, is_discrete, phnbinom, pzinbinom, pztnbinom, pztpois, qhnbinom, qzinbinom, qztnbinom, qztpois, rhnbinom, rzinbinom, rztnbinom, rztpois
  • 0.2.0
    record
    2022-06-21 · diff ↗ ·
    added 15 exports
    HurdlePoisson, ZIPoisson, apply_dpqr, dhpois, dzipois, make_positive_integer, make_support, phpois, prodist, pzipois, qhpois, qzipois, rhpois, rzipois, suff_stat
  • R
    R 4.2.0 released · 2022-04-22
  • 0.1.2
    record
    2022-01-03 · diff ↗ ·
    removed 1 export
    quantile
    added 16 exports
    Erlang, Frechet, GEV, GP, GeomAuc, Gumbel, RevWeibull, StatAuc, geom_auc, kurtosis, plot_cdf, plot_pdf, skewness, stat_auc, support, variance
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • 0.1.1
    record
    2019-09-03
  • R
    R 3.6.0 released · 2019-04-26

Package metadata

First published
2019-09-03
Total releases
8 / 7 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 3.0.2
Bundled data
1.8 KB / 1 file
Download size
462 KB
Appears in task views

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("distributions3")
Zeileis, A., Gasparini, A., Hayes, A., Hvitfeldt, E., Jordan, D., Lang, M. N., Moller-Trane, R., Northrop, P., Stauffer, R., & Wundervald, B. (2026). distributions3: Probability Distributions as S3 Objects (Version 0.3.0) [Computer software]. https://doi.org/10.32614/CRAN.package.distributions3

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

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

From data release v2026-10-22, 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