extract_pdf: Extract probability density function from vector of samples

View source: R/distribution.R

extract_pdfR Documentation

Extract probability density function from vector of samples

Description

Extract probability density function from vector of samples

Usage

extract_pdf(x, support = NULL, n_density = 2^7)

Arguments

x

Vector of samples from a distribution.

support

Vector of length 2 corresponding to the range of the distribution. Can be NULL.

n_density

Number of equally spaced points at which the density is to be estimated (better to use a power of 2).

Value

Dataframe with columns: Value, Density.

Examples

extract_pdf(rnorm(1e3)) %>% head()

ghurault/HuraultMisc documentation built on Dec. 9, 2024, 10:39 a.m.