rvattr: Attributes of Random Variables

View source: R/rvattr.R

rvattrR Documentation

Attributes of Random Variables

Description

rvattr

Usage

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.

Author(s)

Jouni Kerman jouni@kerman.com

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

Examples


  ##


rv documentation built on March 18, 2022, 5:55 p.m.