Skip to content

Vectors Representing Random Variables

2packages depend
3.3Kdownloads / year
100.0%test coverage
13/13flavors OK

Overview

About

Random vectors, called rvecs. An rvec holds multiple draws, but tries to behave like a standard R vector, including working well in data frames. Rvecs are useful for analysing output from a simulation or a Bayesian analysis.

Changes in 1.0.5

New functions

  • Added extract_draws() for selection by index, including repeated indices, and thin_draws() for random selection without replacement in original order.
  • Added draws_any_na(), draws_all_na(), draws_any_infinite(), draws_all_infinite(), draws_any_finite(), and draws_all_finite() to check missingness and finiteness across draws for each element.
  • pmin() and pmax() now accept rvecs in any argument position for elementwise bounds and comparisons within each draw. Calls without rvecs retain base R behaviour.
  • which.min() and which.max() now find the first extreme position within each draw. Empty rvecs return empty index rvecs; nonempty draws with no valid index return NA with one summary warning per call. Ordinary inputs retain base R behaviour.
Show all changes in 1.0.5Hide the rest of the changes in 1.0.5

Constructors

  • new_rvec_chr(), new_rvec_dbl(), new_rvec_int(), and new_rvec_lgl() now accept a scalar value to fill all elements and draws, including NA. Existing defaults are unchanged.

Summaries

  • draws_ci() now accepts point = "mean" to report a mean point estimate; the default remains point = "median" and interval limits are unchanged.
  • min(), max(), and range() now summarise elements independently within each draw, including multiple arguments and missing-value handling.
  • quantile() now calculates quantiles independently within each draw, preserving base R's probability, missing-value, naming, and algorithm options.

Bug fixes

  • rank() now preserves fractional average ranks for tied values instead of failing when converting them to integers. Logical rvecs also use a compatible ranking method, and singleton and empty inputs retain their original draw counts.

Documentation

  • Improved documentation for draw summaries and resolved a roxygen warning about matrix multiplication methods while retaining support for R < 4.3.

Clarifying interface

  • Internal functions now enforce the (previously implicit) constraint that rvecs must have at least one draw. Rvecs of length 0 (ie with 1+ columns but 0 rows internally) continue to be allowed.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 6.2 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-04
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • NOTE12 OK, 1 NOTE2026-06-08
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.0.5
READMEYes · 98 wordsVignettesYes · 1 · dynamicNEWSYes · 100% structured · mentions 1.0.5Citation fileNoWebsiteYes · pkgdown
Help pages
50includes a package overview page
Examples that run
100%47 run in a plain check
Exported functions with examples
100%
Documented parameters
91%
Return-value docs
100%
Help pages citing references
0%
Vignettes (1)

Downloads

3.3K
CRAN downloads in the past year
Rank #10,747 · ~9/day · ~272/mo
Daily download trend is not available in this view yet.
46330 days
96490 days
3.3K1 year
Compare downloads with other packages →
Also on161 r2u3 autocran

Repository

2Stars
0Forks
10Open issues
0Open PRs
1Releases
193Commits
1Commit identities
193 commits · Last activity 2026-10-01
Responsiveness
How these are sampled
PRs merged (all time)
not measured
Median days to close, 50 most recently updated closed issues
79
Median days to close, 50 most recently updated closed PRs
not measured

Stars over time

2025-01-20 · 22026-07-07 · 2
PracticesBeta

10 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/bayesiandemography/rvec on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-10-02 · The repository has a site deploy workflow

pkgdown site last built 2026-10-02

Coverage (1)
Coverage reporting (Codecov)
Reproducibility and dev environment (1)
data-raw/
Show all practicesHide 1 practice
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
17 external dependencies (excludes base and recommended)

Installing rvec adds 13 packages (9 with compiled code, 4.4 MB of source tarballs). Heaviest: vctrs 1.0 MB, rlang 766 KB, cli 629 KB.

Depends (1)
R >= 4.2.0
Imports (14)
cligluegraphicsgrDeviceslifecycleMatrixmatrixStatsmethodsrlangstatstibbletidyselectutilsvctrs
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
2direct
0indirect
Depends 1 · Imports 1
Depends, Imports or LinkingTo, most downloaded first

Datasets

People & History

People (2)
Author, Maintainer since 0.0.6 (2023)
Releases (6)

Pick two releases to compare their code metrics.

  • 1.0.5Latest
    record
    2026-10-02 · current release · diff ↗ ·
    added 12 exports
    draws_all_finite, draws_all_infinite, draws_all_na, draws_any_finite, draws_any_infinite, draws_any_na, extract_draws, pmax, pmin, thin_draws, which.max, which.min
  • R
    R 4.6.0 released · 2026-04-24
  • 1.0.1
    record
    2026-02-15 · diff ↗
  • 1.0.0
    record
    2025-12-10 · diff ↗ ·
    added 8 exports
    draws_cv, draws_sd, draws_var, new_rvec_chr, new_rvec_dbl, new_rvec_int, new_rvec_lgl, pool_draws
  • 0.0.8
    record
    2025-07-13 · diff ↗ ·
    added 1 export
    prob
  • R
    R 4.5.0 released · 2025-04-11
  • 0.0.7
    record
    2024-09-15 · diff ↗ ·
    added 4 exports
    draws_max, draws_min, extract_draw, new_rvec
  • R
    R 4.4.0 released · 2024-04-24
  • 0.0.6
    record
    2023-11-08
  • R
    R 4.3.0 released · 2023-04-21

Package metadata

First published
2023-11-08
Total releases
6 / 3 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.2.0
Bundled data
175 KB / 2 files
Download size
429 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("rvec")
Bryant, J., & Bayesian Demography Limited. (2026). rvec: Vectors Representing Random Variables (Version 1.0.5) [Computer software]. https://doi.org/10.32614/CRAN.package.rvec

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for rvec version 1.0.5 [Data set]. HJJB, LLC. Data release v2026-10-21. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy