Generic method for obtaining the parameters of an object.

params(x)

Arguments

x

The object to obtain the parameters of.

Value

A named vector (or list) of distribution parameters.

Examples

x <- normal(5, 2)
params(x)  # mu = 5, var = 2
#>  mu var 
#>   5   2 

y <- exponential(3)
params(y)  # rate = 3
#> rate 
#>    3