extract_pmf: Extract probability mass function from vector of samples

Description Usage Arguments Value Examples

View source: R/distribution.R

Description

Extract probability mass function from vector of samples

Usage

1
extract_pmf(x, support = NULL)

Arguments

x

Vector of samples from a distribution.

support

Vector of all possible values that the distribution can take. Can be NULL.

Value

Dataframe with columns: Value, Probability.

Examples

1
extract_pmf(round(rnorm(1e4, 0, 10)))

HuraultMisc documentation built on Sept. 6, 2021, 9:09 a.m.