as.double.rv: Coercing Random Vectors to Real-valued

Description Usage Arguments Details Author(s) References Examples

View source: R/rv.R

Description

Coerces random vector objects into double-valued ones.

Usage

1
2
## S3 method for class 'rv'
as.double(x, ...)

Arguments

x

an rv object

...

other arguments

Details

as.double coerces an rv object into double-valued one. In effect, the function as.double is applied to all simulations.

Author(s)

Jouni Kerman [email protected]

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
3
  x <- as.logical(rvbern(prob=0.5)) 
  print(x)
  print(as.double(x))

jsta/rv documentation built on Jan. 11, 2019, 3:28 p.m.