as.double.rv {rv} | R Documentation |
Coerces random vector objects into double-valued ones.
## S3 method for class 'rv': as.double(x, ...) ## S3 method for class 'rv': as.real(x, ...)
x |
an rv object |
... |
other arguments |
as.double
coerces an rv object into double-valued one.
In effect, the function as.double
is applied to all simulations.
as.real
is a synonym.
Jouni Kerman kerman@stat.columbia.edu http://www.stat.columbia.edu/~kerman
Kerman, Jouni and Gelman, Andrew. Manipulating and Summarizing Posterior Simulations Using Random Variable Objects. Technical report, Columbia University, New York.
x <- as.logical(rvbern(prob=0.5)) print(x) print(as.double(x))