Learn R Programming

rv (version 0.949)

rvlapply: 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

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.

References

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

Examples

Run this code
#

Run the code above in your browser using DataLab