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

# S3 method for class 'weibull_dist'
density(x, ...)

Arguments

x

A weibull_dist object.

...

Additional arguments (not used).

Value

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

Examples

x <- weibull_dist(shape = 2, scale = 3)
f <- density(x)
f(1)
#> [1] 0.1988532
f(3)
#> [1] 0.245253