R/distribution.R
is-distribution.Rd
This function returns TRUE for distributions and FALSE for all other objects.
TRUE
FALSE
is_distribution(x)
An object.
TRUE if the object inherits from the distribution class.
dist <- dist_normal() is_distribution(dist) #> [1] TRUE is_distribution("distributional") #> [1] FALSE