unlistrv | R Documentation |
Given a list structure x
, unlist
simplifies it to produce a
vector which contains all the atomic components (containing rv
objects) which occur in x
.
unlistrv(x, recursive = TRUE, use.names = TRUE)
x |
An R object, typically a list or vector (containing rv objects) |
recursive |
logical. Should unlisting be applied to list components of x? |
use.names |
logical. Should names be preserved? (now fixed to TRUE) |
This is the rv-compatible version of the function unlist
.
Since unlist
is not a generic function, the whole name
unlistrv
must be specified when calling the function when x
is
an 'rv' object.
Jouni Kerman jouni@kerman.com
Kerman, J. and Gelman, A. (2007). Manipulating and Summarizing Posterior Simulations Using Random Variable Objects. Statistics and Computing 17:3, 235-244.
See also vignette("rv")
.
unlist
x <- list(a=rvnorm(2), b=rvnorm(3)) print(unlistrv(x))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.