ast2ast: Translates an R Function to a C++ Function

Enable translation of a tiny subset of R to C++. The user has to define a R function which gets translated. For a full list of possible functions check the documentation. After translation an R function is returned which is a shallow wrapper around the C++ code. Alternatively an external pointer to the C++ function is returned to the user. The intention of the package is to generate fast functions which can be used as ode-system or during optimization.

Version: 1.1.1
Depends: R (≥ 4.1.0)
Imports: Rcpp (≥ 1.0.4), R6, methods, RcppThread, utils, sundials
LinkingTo: Rcpp, RcppThread
Suggests: knitr, kableExtra, rmarkdown, tinytest, microbenchmark, ggplot2, RcppXPtrUtils, pkgbuild, nnls, Matrix
Published: 2026-10-26
DOI: 10.32614/CRAN.package.ast2ast
Author: Krämer Konrad [aut, cre]
Maintainer: Krämer Konrad <konrad_kraemer at yahoo.de>
BugReports: https://github.com/Konrad1991/ast2ast/issues
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
URL: https://github.com/Konrad1991/ast2ast
NeedsCompilation: yes
SystemRequirements: GNU make, C++20, Rtools (>= 4.5) on Windows
Materials: NEWS
CRAN checks: ast2ast results

Documentation:

Reference manual: ast2ast.html , ast2ast.pdf
Vignettes: Detailed Documentation (source)
Differences to R (source)
Information for package authors (source)
Inner Functions and Custom Types (source)
Jacobians: Dense, Coloured, Sparse and Banded (source)
Named Vectors and Layouts (source)
The Memory Model: Copy, Borrow, Ref (source)
Derivatives at Tiny States: Michaelis-Menten (source)

Downloads:

Package source: ast2ast_1.1.1.tar.gz
Windows binaries: r-devel: ast2ast_1.0.2.zip, r-release: ast2ast_1.0.2.zip, r-oldrel: ast2ast_1.0.2.zip
macOS binaries: r-release (arm64): ast2ast_1.0.2.tgz, r-oldrel (arm64): ast2ast_1.0.2.tgz, r-release (x86_64): ast2ast_1.0.2.tgz, r-oldrel (x86_64): ast2ast_1.0.2.tgz
Old sources: ast2ast archive

Linking:

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