Skip to content

cpp4r

1.3.0Package record

Header-Only 'C++' and 'R' Interface

8packages depend
28.1Kdownloads / year
79.7%test coverage
13/13flavors OK

Overview

About

Provides a header only, 'C++' interface to 'R' with enhancements over 'cpp11'. Enforces copy-on-write semantics consistent with 'R' behavior. Offers native support for ALTREP objects, 'UTF-8' string handling, modern 'C++' features and idioms, and reduced memory requirements. Allows for vendoring, making it useful for restricted environments. Compared to 'cpp11', it adds support for converting 'C++' maps to 'R' lists, 'Roxygen' documentation directly in 'C++' code, proper handling of matrix attributes, support for nullable external pointers, bidirectional copy of complex number types, flexibility in type conversions, use of nullable pointers, and various performance optimizations.

Changes in 1.3.0
  • Allows a header only codebase. The previous versions required one or more .cpp files in order to register the exposed functions.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 2.6 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.3.0
README· In the repository, left out of the releaseVignettesYes · 17 · staticNEWSYes · 100% structured · mentions 1.3.0Citation fileNoWebsiteYes
Help pages
5includes a package overview page
Examples that run
100%4 run in a plain check
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
0%

Downloads

28.1K
CRAN downloads in the past year
Rank #2,130 · ~77/day · ~2.3K/mo
Daily download trend is not available in this view yet.
3.2K30 days
8.5K90 days
28.1K1 year
Compare downloads with other packages →
Also on989 r2u22 autocran562 conda_forge

Repository

8Stars
0Forks
0Open issues
0Open PRs
0Releases
46Commits
1Commit identities
cpprstats
License file reads as Apache-2.0 · 46 commits · Last activity 2026-09-23 · 0% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
19
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-10-19 · 32026-08-21 · 8
PracticesBeta

11 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/pachadotdev/cpp4r on 2026-10-21.

Continuous integration (2)
GitHub ActionsR CMD check workflow

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

Governance and community (4)
Code of conductContributing guideIssue templates

The repository owner accepts GitHub Sponsors

Docs source (1)

GitHub Pages site last deployed 2026-09-23

Coverage (1)
Coverage reporting
Show all practicesHide 2 practices
Reproducibility and dev environment (1)
Makefile
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
3 external dependencies (excludes base and recommended)

Installing cpp4r adds no packages beyond those that come with R.

Depends (1)
R >= 4.0.0
Imports (0)
none
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
8direct
22indirect
Imports 1 · LinkingTo 7
Depends, Imports or LinkingTo, most downloaded first

People & History

People (2)
Author, Maintainer since 0.3.0 (2025)
Author
Original cpp11 package
Releases (8)

Pick two releases to compare their code metrics.

Package metadata

First published
2025-10-16
Total releases
8 / 1 yrs
License
Apache License (>= 2)
Minimum R
≥ 4.0.0
Download size
203 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("cpp4r")
Vargas Sepulveda, M., & Posit Software, PBC, . (2026). cpp4r: Header-Only 'C++' and 'R' Interface (Version 1.3.0) [Computer software]. https://doi.org/10.32614/CRAN.package.cpp4r

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

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