R/new_d.R, and 3 more
# S3 method for p print(x, ...) # S3 method for d print(x, ...) # S3 method for q print(x, ...) # S3 method for r print(x, ...)
Pdqr-function to print.
Further arguments passed to or from other methods.
Print output of pdqr-function describes the following information:
Full name of function class:
P-function is "Cumulative distribution function".
D-function is "Probability mass function" for "discrete" type and "Probability density function" for "continuous".
Q-function is "Quantile function".
R-function is "Random generation function".
Type of function in the form "of * type" where "*" is "discrete" or "continuous" depending on actual type.
Support of function.
Number of elements in distribution for "discrete" type or number of intervals of piecewise-linear density for "continuous" type.
If pdqr-function has "discrete" type and exactly two possible values 0 and
1, it is treated as "boolean" pdqr-function and probability of 1 is shown.
This is done to simplify interactive work with output of comparing functions
>=, etc. (see description of methods for S3 group generic functions). To extract probabilities from "boolean"
Symbol "~" in
print() output indicates that printed value or support is an
approximation to a true one (for readability purpose).
#> Probability mass function of discrete type #> Support: [1, 10] (10 elements)#> Random generation function of continuous type #> Support: [0, 1] (250 intervals)# Printing of boolean pdqr-function print(r_unif >= 0.3)#> Random generation function of discrete type #> Support: [0, 1] (2 elements, probability of 1: 0.7)