rvec-package {rvec} | R Documentation |
Package 'rvec'
Description
Tools for working with random draws from a distribution, eg draws from a posterior distribution in a Bayesian analysis.
Details
An rvec holds multiple draws, but wherever possible
behaves like an ordinary R vector. For instance, if x
is an rvec holding 1000 draws from a distribution,
then 2 * x
returns a new rvec where each draw has
been multiplied by 2.
To summarise across draws, use a function starting with draws
.
For instance, to calculate a credible interval, use draws_ci()
.
Functions
Creating rvecs
-
rvec()
- class depends on input -
rvec_dbl()
- doubles -
rvec_int()
- integers -
rvec_lgl()
- logical -
rvec_chr()
- character -
collapse_to_rvec()
- data in data frame
Manipulating rvecs
Probability distributions
Summarizing across draws
Coercion, classes
Weighted summaries
Datasets
Packages with similar functionality
Author(s)
Maintainer: John Bryant john@bayesiandemography.com
Other contributors:
Bayesian Demography Limited [copyright holder]
See Also
Useful links:
Report bugs at https://github.com/bayesiandemography/rvec/issues