|File Search||Catalog||Content Search|
R data types (SEXP) are matched to C++ objects in a class hierarchy. All R types are supported (vectors, functions, environment, etc ...) and each type is mapped to a dedicated class. For example, numeric vectors are represented as instances of the Rcpp::NumericVector class, environments are represented as instances of Rcpp::Environment, functions are represented as Rcpp::Function, etc ... The "Rcpp-introduction" vignette provides a good entry point to Rcpp.
Conversion from C++ to R and back is driven by the templates Rcpp::wrap and Rcpp::as which are highly flexible and extensible, as documented in the "Rcpp-extending" vignette.
Rcpp also provides Rcpp modules, a framework that allows exposing C++ functions and classes to the R level. The "Rcpp-modules" vignette details the current set of features of Rcpp-modules.
Rcpp includes a concept called Rcpp sugar that brings many R functions into C++. Sugar takes advantage of lazy evaluation and expression templates to achieve great performance while exposing a syntax that is much nicer to use than the equivalent low-level loop code. The "Rcpp-sugar" vignette gives an overview of the feature.
Several examples are included, and 753 unit tests in 338 unit test functions provide additional usage examples.
An earlier version of Rcpp, containing what we now call the 'classic Rcpp API' was written during 2005 and 2006 by Dominick Samperi. This code has been factored out of Rcpp into the package RcppClassic and it is still available for code relying on this interface. New development should use this package instead.
History ======= Rcpp continues and extends earlier work by Dominick Samperi which he initially contributed directly into the RQuantLib package. Then, during 2005 and 2006, several releases were made as CRAN packages, first under the name Rcpp and later under the name RcppTemplate. However, both packages were left abandonded after November 2006. Later, in November 2009, two brief releases were more»
A much simpler version of the example is provided in the file newApiExample.r. With littler installed, it can be run 'as is' as a shell script; else it can be sourced into R. -- Dirk Eddelbuettel and Romain Francois, 06 Feb 2010 This directory provides a simple example of how an R function can be passed back and forth between R and C++. We define the function at the R level, pass it to C more»
0.9.13 2012-06-28 o Truly corrected Rcpp::Environment class by having default constructor use the global environment, and removing the default argument of global environment from the SEXP constructor o Added tests for clang++ version to include bits/exception_defines.h for versions 3.0 or higher (similar to g++ 4.6.0 or later), needed to include one particul more»
rcpp (0.9.13-1) unstable; urgency=low * New release -- Dirk Eddelbuettel <email@example.com> Thu, more»
2012-06-28 Dirk Eddelbuettel <firstname.lastname@example.org> * DESCRIPTION: Release 0.9.13 * ins more»
Current active misfeatures o Rcpp.package.skeleton() does not work with supplied functions, more»
In alphabetical order: Baptiste Auguie for additional OS X testing Dario Buttari more»
This is the Debian GNU/Linux r-cran-rcpp package of Rcpp, an R / C++ interface package. Rcpp was wri more»