Combines random vectors by columns (cbind.rv) or rows (rbind.rv).

# S3 method for rv
cbind(..., deparse.level = 1)

Arguments

...

vectors or matrices, can be rv objects

deparse.level

(passed on to cbind)

Details

See cbind and rbind for details.

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").

Author

Jouni Kerman jouni@kerman.com

Examples

  x <- rvnorm(10)
  y <- rvnorm(10)
  cbind(x, y)
#>           mean   sd   1% 2.5%   25%     50%  75% 97.5% 99% sims
#>  [1,1] -0.0032 0.99 -2.3 -2.0 -0.64 -0.0013 0.65   1.9 2.3 4000
#>  [2,1]  0.0120 1.00 -2.2 -1.9 -0.67  0.0367 0.69   2.0 2.3 4000
#>  [3,1] -0.0411 0.99 -2.3 -2.0 -0.72 -0.0117 0.63   1.9 2.3 4000
#>  [4,1] -0.0057 1.01 -2.3 -2.0 -0.68 -0.0185 0.69   1.9 2.4 4000
#>  [5,1]  0.0209 1.00 -2.3 -2.0 -0.67  0.0288 0.71   2.0 2.3 4000
#>  [6,1] -0.0210 1.00 -2.2 -1.9 -0.70 -0.0323 0.64   1.9 2.3 4000
#>  [7,1]  0.0091 1.00 -2.3 -2.0 -0.66 -0.0024 0.66   2.0 2.3 4000
#>  [8,1] -0.0024 1.00 -2.3 -1.9 -0.67  0.0125 0.67   1.9 2.4 4000
#>  [9,1] -0.0123 1.00 -2.3 -2.0 -0.71  0.0225 0.67   2.0 2.3 4000
#> [10,1]  0.0117 0.99 -2.3 -1.9 -0.64  0.0290 0.63   2.0 2.4 4000
#>  [1,2]  0.0253 1.00 -2.2 -1.9 -0.67  0.0248 0.70   2.0 2.3 4000
#>  [2,2] -0.0021 1.01 -2.3 -2.0 -0.69 -0.0096 0.68   2.0 2.3 4000
#>  [3,2] -0.0225 1.01 -2.3 -2.0 -0.73 -0.0308 0.66   2.0 2.4 4000
#>  [4,2]  0.0090 1.00 -2.3 -1.9 -0.69  0.0233 0.69   2.0 2.3 4000
#>  [5,2] -0.0198 1.00 -2.3 -1.9 -0.70 -0.0309 0.67   2.0 2.3 4000
#>  [6,2] -0.0089 1.01 -2.3 -2.0 -0.70 -0.0194 0.70   1.9 2.3 4000
#>  [7,2]  0.0356 1.00 -2.3 -1.9 -0.63  0.0449 0.70   2.0 2.3 4000
#>  [8,2]  0.0091 0.98 -2.2 -1.9 -0.68 -0.0084 0.70   1.9 2.4 4000
#>  [9,2]  0.0095 0.99 -2.2 -1.9 -0.65  0.0046 0.68   2.0 2.3 4000
#> [10,2]  0.0120 1.00 -2.3 -1.9 -0.68  0.0065 0.69   1.9 2.3 4000
  rbind(x, y) 
#>           mean   sd   1% 2.5%   25%     50%  75% 97.5% 99% sims
#>  [1,1] -0.0032 0.99 -2.3 -2.0 -0.64 -0.0013 0.65   1.9 2.3 4000
#>  [2,1]  0.0253 1.00 -2.2 -1.9 -0.67  0.0248 0.70   2.0 2.3 4000
#>  [1,2]  0.0120 1.00 -2.2 -1.9 -0.67  0.0367 0.69   2.0 2.3 4000
#>  [2,2] -0.0021 1.01 -2.3 -2.0 -0.69 -0.0096 0.68   2.0 2.3 4000
#>  [1,3] -0.0411 0.99 -2.3 -2.0 -0.72 -0.0117 0.63   1.9 2.3 4000
#>  [2,3] -0.0225 1.01 -2.3 -2.0 -0.73 -0.0308 0.66   2.0 2.4 4000
#>  [1,4] -0.0057 1.01 -2.3 -2.0 -0.68 -0.0185 0.69   1.9 2.4 4000
#>  [2,4]  0.0090 1.00 -2.3 -1.9 -0.69  0.0233 0.69   2.0 2.3 4000
#>  [1,5]  0.0209 1.00 -2.3 -2.0 -0.67  0.0288 0.71   2.0 2.3 4000
#>  [2,5] -0.0198 1.00 -2.3 -1.9 -0.70 -0.0309 0.67   2.0 2.3 4000
#>  [1,6] -0.0210 1.00 -2.2 -1.9 -0.70 -0.0323 0.64   1.9 2.3 4000
#>  [2,6] -0.0089 1.01 -2.3 -2.0 -0.70 -0.0194 0.70   1.9 2.3 4000
#>  [1,7]  0.0091 1.00 -2.3 -2.0 -0.66 -0.0024 0.66   2.0 2.3 4000
#>  [2,7]  0.0356 1.00 -2.3 -1.9 -0.63  0.0449 0.70   2.0 2.3 4000
#>  [1,8] -0.0024 1.00 -2.3 -1.9 -0.67  0.0125 0.67   1.9 2.4 4000
#>  [2,8]  0.0091 0.98 -2.2 -1.9 -0.68 -0.0084 0.70   1.9 2.4 4000
#>  [1,9] -0.0123 1.00 -2.3 -2.0 -0.71  0.0225 0.67   2.0 2.3 4000
#>  [2,9]  0.0095 0.99 -2.2 -1.9 -0.65  0.0046 0.68   2.0 2.3 4000
#> [1,10]  0.0117 0.99 -2.3 -1.9 -0.64  0.0290 0.63   2.0 2.4 4000
#> [2,10]  0.0120 1.00 -2.3 -1.9 -0.68  0.0065 0.69   1.9 2.3 4000