split.rv {rv}R Documentation

Split a Random Vector into a List by Name

Description

Split a random vector into a list by name.

Usage

  split.rv(x, f, drop=FALSE, ...)

Arguments

x a random vector
f a ``factor" that specifies the grouping, by default the variable names derived from names{x}.
drop logical indicating if levels that do not occur should be dropped (if f is a factor or a list).
... further potential arguments passed to methods.

Details

If f is omitted, splitting is done by names(x), but with the possible brackets (as in ``alpha[10]") omitted.

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.

See Also

split.

Examples

  x <- rvnorm(3)
  names(x) <- c("alpha[1]", "alpha[2]", "theta")
  split(x)

[Package rv version 0.911 Index]