rvconst: Random Vector with a Point-Mass Distribution

Description Usage Arguments Details Value Author(s) References Examples

View source: R/rvconst.R

Description

Coerces a given vector of constants into a random vector with 1 simulation in each component.

Usage

1
rvconst(n = 1, x = 0)

Arguments

n

integer: number of variables to generate

x

a vector of constants

Details

Coerces a given vector of constants into a random vector with 1 simulation in each component.

Value

A random vector (rv object) of length n.

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
2
  x <- rvconst(x=1:3)
  c(x, 4)

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