Learn R Programming

algebraic.dist (version 0.9.1)

density.uniform_dist: Probability density function for a uniform distribution.

Description

Returns a function that evaluates the uniform PDF at given points.

Usage

# S3 method for uniform_dist
density(x, ...)

Value

A function function(t, log = FALSE, ...) returning the density (or log-density) at t.

Arguments

x

A uniform_dist object.

...

Additional arguments (not used).

Examples

Run this code
x <- uniform_dist(0, 10)
f <- density(x)
f(5)
f(15)

Run the code above in your browser using DataLab