[Stable]

This function returns TRUE for distributions and FALSE for all other objects.

is_distribution(x)

Arguments

x

An object.

Value

TRUE if the object inherits from the distribution class.

Examples

dist <- dist_normal()
is_distribution(dist)
#> [1] TRUE
is_distribution("distributional")
#> [1] FALSE