Learn R Programming

rv (version 0.949)

apply.rv: Distribution of the Range of a Random Vector

Description

apply.rv returns a 2-component random vector containing the distributions of the minimum and the maximum values of all the given arguments.

Usage

## S3 method for class 'rv':
apply(X, MARGIN, FUN, \dots)

Arguments

X
MARGIN
FUN
...
further arguments passed to or from other methods

Details

This is the rv-compatible version of the function apply. Since apply is not a generic function, the whole name apply.rv must be specified when calling the function when X is an 'rv' object.

References

Kerman, Jouni and Gelman, Andrew. Manipulating and Summarizing Posterior Simulations Using Random Variable Objects. Technical report, Columbia University, New York.

See Also

quantile.rv

Examples

Run this code
x <- rvmatrix(rvnorm(12), nrow=3, ncol=4)
  print(apply.rv(x, 1, sum))

Run the code above in your browser using DataLab