Skip to content

cramR

0.1.1Package record

Cram Method for Efficient Simultaneous Learning and Evaluation

0packages depend
3Kdownloads / year
66.3%test coverage
13/13flavors OK

Overview

About

Performs the Cram method, a general and efficient approach to simultaneous learning and evaluation using a generic machine learning algorithm. In a single pass of batched data, the proposed method repeatedly trains a machine learning algorithm and tests its empirical performance. Because it utilizes the entire sample for both learning and evaluation, cramming is significantly more data-efficient than sample-splitting. Unlike cross-validation, Cram evaluates the final learned model directly, providing sharper inference aligned with real-world deployment. The method naturally applies to both policy learning and contextual bandits, where decisions are based on individual features to maximize outcomes. The package includes cram_policy() for learning and evaluating individualized binary treatment rules, cram_ml() to train and assess the population-level performance of machine learning models, and cram_bandit() for on-policy evaluation of contextual bandit algorithms. For all three functions, the package provides estimates of the average outcome that would result if the model were deployed, along with standard errors and confidence intervals for these estimates. Details of the method are described in Jia, Imai, and Li (2024) https://www.hbs.edu/ris/Publication%20Files/2403.07031v1_a83462e0-145b-4675-99d5-9754aa65d786.pdf and Jia et al. (2025) doi:10.48550/arXiv.2403.07031.

Install

Health

CRAN checks
13OK
Slowest check: 12.6 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK13 OK2026-05-02
Show 4 earlier changesHide 4 earlier changes
  • ERROR11 OK, 1 ERROR2026-04-25
  • NOTE11 OK, 3 NOTE2026-04-01
  • ERROR10 OK, 3 NOTE, 1 ERROR2026-03-30
  • NOTE11 OK, 3 NOTE2026-03-10
Advisories

none known

Documentation

In release 0.1.1
READMEYes · 793 wordsVignettesYes · 8 · evaluation depends on the environmentNEWSYes · 67% structured · does not mention 0.1.1Citation fileYes · cites a publicationWebsiteYes · pkgdown
Help pages
30
Examples that run
60%3 run in a plain check · 2 only when donttest examples are enabled (R CMD check --as-cran)
Exported functions with examples
17%
Documented parameters
100%
Return-value docs
83%
Help pages citing references
0%

Downloads

3K
CRAN downloads in the past year
Rank #14,663 · ~8/day · ~248/mo
Daily download trend is not available in this view yet.
30930 days
80390 days
3K1 year
Compare downloads with other packages →
Also on139 r2u12 autocran

Repository

3Stars
0Forks
0Open issues
0Open PRs
0Releases
312Commits
1Commit identities
312 commits · Last activity 2025-05-15 · 0% stars, 30d · The default branch showed an older version (0.1.0) than CRAN on 2026-10-11
Responsiveness
not measured

Stars over time

2025-05-22 · 32026-07-07 · 3
PracticesBeta

3 development-tooling and community-health practices detected across 2 families in the upstream repository

Checks run against github.com/yanisvdc/cramr on 2026-10-11.

Docs source (2)
pkgdown

GitHub Pages site last deployed 2025-05-15

pkgdown site last built 2025-05-15, before release 0.1.1 (2025-08-24)

Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
28 external dependencies (excludes base and recommended)

Installing cramR adds 120 packages (60 with compiled code, 87 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, data.table 5.7 MB.

Depends (1)
R >= 3.5.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (5)
Maintainer since 0.1.0 (2025), Author
Contributor
Contributor
Contributor
Releases (2)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 0.1.1Latest
    record
    2025-08-24 · current release · diff ↗
  • 0.1.0
    record
    2025-05-14
  • R
    R 4.5.0 released · 2025-04-11

Package metadata

First published
2025-05-14
Total releases
2 / 1 yrs
License
GPL-3 OSI
Minimum R
≥ 3.5.0
Download size
3.6 MB

Cite

Cite this package

Run in R for the authors' entry:

citation("cramR")

The package provides a citation file, so citation() returns the authors' own entry.

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 cramR version 0.1.1 [Data set]. HJJB, LLC. Data release v2026-10-18. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-18, 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