Learn R Programming

cpp4r (version 0.4.0)

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

Description

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++11' 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.

Copy Link

Version

Install

install.packages('cpp4r')

Monthly Downloads

386

Version

0.4.0

License

Apache License (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Mauricio Vargas Sepulveda

Last Published

December 4th, 2025

Functions in cpp4r (0.4.0)

vendor

Vendor the cpp4r headers
register

Generates wrappers for registered C++ functions
unvendor

Unvendor the cpp4r headers
pkg_template

Start a new project with the cpp4r package template
cpp4r-package

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