rvcut | R Documentation |
Convert implements the ‘cut’ function using random variables.
rvcut(x, ...)
x |
a plain or a random vector which is to be converted to a factor by cutting. |
... |
arguments passed to the function |
A random factor.
Jouni Kerman jouni@kerman.com
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")
.
rvfactor
, cut
.
rvcut(rvnorm(1), breaks=c(-Inf,-2,-1,0,1,2,Inf))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.