dist_density: Create distributional object based on a specified density

View source: R/dist_density.R

dist_densityR Documentation

Create distributional object based on a specified density

Description

Creates a distributional object using a density specified as pair of vectors giving (x, f(x)). The density is assumed to be piecewise linear between the points provided, and 0 outside the range of x.

Usage

dist_density(x, density)

Arguments

x

Numerical vector of ordinates, or a list of such vectors.

density

Numerical vector of density values, or a list of such vectors.

Examples

dist_density(seq(-4, 4, by = 0.01), dnorm(seq(-4, 4, by = 0.01)))


weird documentation built on Jan. 27, 2026, 9:06 a.m.