Learn R Programming

algebraic.dist (version 0.9.1)

density.exponential: Method to obtain the pdf of an exponential object.

Description

Method to obtain the pdf of an exponential object.

Usage

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

Value

A function that computes the pdf of the exponential distribution at a given point t. Also accepts a rate argument that determines the failure rate of the exponential distribution (defaults to the failure rate of object x) and a log argument that determines whether to compute the log of the pdf.

Arguments

x

The object to obtain the pdf of

...

Additional arguments (not used)

Examples

Run this code
x <- exponential(rate = 2)
f <- density(x)
f(0)
f(1)

Run the code above in your browser using DataLab