rvattr: Attributes of Random Variables

Description Usage Arguments Details Author(s) References Examples

View source: R/rvattr.R

Description

rvattr

Usage

1
2
3
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

1
  ##

jsta/rv documentation built on Feb. 12, 2022, 5:13 p.m.