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.