Method to obtain the pdf of an exponential object.
# S3 method for class 'exponential'
density(x, ...)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.
x <- exponential(rate = 2)
f <- density(x)
f(0)
#> [1] 2
f(1)
#> [1] 0.2706706