get_pmf: Get the probability mass function of a nonparametric...

View source: R/dist_spec.R

get_pmfR Documentation

Get the probability mass function of a nonparametric distribution

Description

[Experimental]

Usage

get_pmf(x, id = NULL)

Arguments

x

A ⁠<dist_spec>⁠.

id

Integer; the id of the distribution to use (if x is a composite distribution). If x is a single distribution this is ignored and can be left at its default value of NULL.

Value

The pmf of the distribution

Examples

dist <- discretise(Gamma(shape = 3, rate = 2, max = 10))
get_pmf(dist)

epiforecasts/EpiNow2 documentation built on Oct. 31, 2024, 2:30 p.m.