rvlapply {rv}R Documentation

Apply a Function to Components of a Random Vector

Description

lapply.rv applies a given function to the components of a random vector; it is an `rv'-compatible version of lapply.

Usage

  lapply.rv(x, FUN, ...)

Arguments

x an object
FUN a function
... further arguments passed to the function FUN

Details

Value

A list of the same length as x, with values FUN(x[i], ...) in component i. The names of the list are taken from the names of the components of x.

Author(s)

Jouni Kerman kerman@stat.columbia.edu http://www.stat.columbia.edu/~kerman

References

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

Examples

  #

[Package rv version 0.949 Index]