valid: Valid

Description Usage Arguments Value Examples

View source: R/dist.R

Description

Generic function to determine if the distribution is a valid probability distribution, i.e. if the support is not empty and at least one observation has been made.

Usage

1
valid(d)

Arguments

d

Dist object representing the distribution.

Value

Logical representing the validity of the distribution.

Examples

1
2
3
4
5
d <- Dist(5)
valid(d) # FALSE, support is empty

d <- Dist(c(0, 1, 0))
valid(d) # TRUE, at least one observation is made

rinform documentation built on April 1, 2018, 12:12 p.m.