This package shows some simple examples for the use of Rcpp.
It can also serve as a working template to create packages that use Rcpp to interface C++ code or libraries.
The Rcpp package provides a number of C++ classes that ease access to C++ from R. This comprises both passing parameters to functions, as well as returning results back from C++ to R.
The RcppExamples package provides some simple examples for use of Rcpp. At this point the documentation is not complete in the sense of not covering all accessible classes. However, several basic use cases are illustrated,
The http://gallery.rcpp.org site regroups a number of examples.