Learn R Programming

distributional (version 0.5.0)

is_distribution: Test if the object is a distribution

Description

[Stable]

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

Usage

is_distribution(x)

Value

TRUE if the object inherits from the distribution class.

Arguments

x

An object.

Examples

Run this code
dist <- dist_normal()
is_distribution(dist)
is_distribution("distributional")

Run the code above in your browser using DataLab