Chaomei, We have an entire vignette dedicated to this, and several packages on CRAN which provide working examples of Rcpp Modules use -- my RcppRedis and RcppCNPy come to mind (and the former is more recent). Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org