is.probspace: Testing for a Probability Space

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Decides whether a given object is a probability space.

Usage

1

Arguments

x

an object for which probability space status should be checked.

Details

It first checks if the class of the object includes ps, and if so TRUE is returned. If not, then it checks that the object is a data frame and contains a probs column. Lastly, it checks whether all entries of probs are nonnegative. Note that it does not check whether the sum of probs is one, to allow for the possibility that the input object is a proper subset of a probability space.

Value

Logical.

Author(s)

G. Jay Kerns gkerns@ysu.edu.

See Also

probspace

Examples

1
2
S <- rolldie(3, makespace = TRUE)
is.probspace(S)

prob documentation built on May 2, 2019, 12:20 p.m.