vecrep: Compact Vector Replication

Replicates vectors using ALTREP (Alternative Representations for R Objects), avoiding unnecessary memory allocation. When a vector is repeated many times, only a reference to the original data is stored rather than copying the full expanded replicates into memory. The expanded data is only materialised if it is modified, making repeated vectors cheap to create and pass around. This is particularly useful when working with large repeated sequences, such as replicated index vectors, simulation inputs, or repeated reference values in data pipelines.

Version: 0.1.0
Depends: R (≥ 3.5)
Suggests: spelling, testthat (≥ 3.0.0)
Published: 2026-06-18
DOI: 10.32614/CRAN.package.vecrep (may not be active yet)
Author: Mitchell O'Hara-Wild ORCID iD [aut, cre, cph], Gabriel Becker [ctb] (For developing the example ALTREP package vectorwindow that was foundational to this package.)
Maintainer: Mitchell O'Hara-Wild <mail at mitchelloharawild.com>
BugReports: https://github.com/mitchelloharawild/vecrep/issues
License: MIT + file LICENSE
URL: https://pkg.mitchelloharawild.com/vecrep/, https://github.com/mitchelloharawild/vecrep
NeedsCompilation: yes
Language: en-GB
Materials: README, NEWS
CRAN checks: vecrep results

Documentation:

Reference manual: vecrep.html , vecrep.pdf

Downloads:

Package source: vecrep_0.1.0.tar.gz
Windows binaries: r-devel: not available, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): vecrep_0.1.0.tgz, r-oldrel (arm64): vecrep_0.1.0.tgz, r-release (x86_64): vecrep_0.1.0.tgz, r-oldrel (x86_64): vecrep_0.1.0.tgz

Linking:

Please use the canonical form https://CRAN.R-project.org/package=vecrep to link to this page.