rvattr

rvattr(x, attrib = NULL)

rvattr(x, attrib = NULL, by.name = FALSE) <- value

Arguments

x

an object

attrib

name of the attribute

by.name

logical; attempt matching of attributes by name?

value

vector of values to set; can be a list or an atomic vector

Details

If by.name=TRUE, the values within the list value are matched by their name (e.g. `theta[1]') if possible. Matching by NA or the empty string in a name is not possible.

Otherwise, the list is matched by position; in this case, the length of value must be equal to that of x.

References

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").

Author

Jouni Kerman jouni@kerman.com

Examples


  ##