Description Usage Arguments Details Value Author(s) See Also Examples
Decides whether a given object is a probability space.
1 | is.probspace(x)
|
x |
an object for which probability space status should be checked. |
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.
Logical.
G. Jay Kerns gkerns@ysu.edu.
1 2 | S <- rolldie(3, makespace = TRUE)
is.probspace(S)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.