Learn R Programming

HuraultMisc (version 1.1.1)

extract_pmf: Extract probability mass function from vector of samples

Description

Extract probability mass function from vector of samples

Usage

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

Run this code
# NOT RUN {
extract_pmf(round(rnorm(1e4, 0, 10)))
# }

Run the code above in your browser using DataLab