[Rcpp-devel] best way of documenting Rcpp Modules

Dirk Eddelbuettel edd at debian.org
Wed Aug 16 03:41:29 CEST 2017

On 15 August 2017 at 16:12, Luis Avila wrote:
| I've used Roxygen to document my R classes
| but having problems now documenting Rcpp exposed classes from my C++ code.
| I am creating .Rd files manually and that partially solves the problem but
| looking for a better way.
| I have a module expossing c++ classes Model and NormalModel.
| Running R CMD check --as-cran I get:
| Undocumented code objects:
| 'Model'
| Undocumented S4 classes
| 'Rcpp_Model' 'Rcpp_NormalModel'
| I managed to get the "undocumented code object" message to stop reporting
| "NormalModel" as undocumented by manually setting up a NormalModel-class.Rd
| file in man but can't get rid of Rcpp_NormalModel.

One \alias{} entry in the Rd should do. See eg the (still rather basic /
stub) page I put in for RcppAnnoy (which is just Rcpp Modules):


You can write it as Rd, or you can write it in an (empty) R file to be used
by roxygen2 (though I still never let roxygen touch my NAMESPACE, DESCRIPTION
or other files -- but Rd creation I trust).

http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org

More information about the Rcpp-devel mailing list