The C API of the R language and environment is robust, yet a little awkward for C++ programmers. This package wraps a tidy layer of header functions around it.
ExamplesA recent motivating example is from the dang package which includes one unexported Base R function written in C. The original version is here. While short enough, we found working with a tidier version easier and more enjoyable. We include an abbreviated version (minus the copyright header) here:
Additions from the tidyCpp
wrapper can be identified easily via the R::
namespace. While the code is not hiding its C heritage, we find it overall a little easier to work with. Other examples (see below) show how using tidyCpp
can help avoid the very manual and error-prone PROTECT
and UNPROTECT
and pairs.
For additional examples, please see the Motivation vignette for a longer discussion with more examples, and the files in the snippets/ directory for directly callable code examples.
Dirk Eddelbuettel
LicenseGPL (>= 2)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4