[Rcpp-devel] documenting classes exposed with setRcppClass / modules

Dr Gregory Jefferis jefferis at mrc-lmb.cam.ac.uk
Fri Aug 29 17:21:46 CEST 2014


Hello,

I just wondered if someone could give me some pointers for how to 
document classes exposed by Rcpp Modules / setRcppClass. I am a little 
hazy on what setRcppClass is doing and how I should be documenting it 
and reading

	http://cran.r-project.org/web/packages/Rcpp/vignettes/Rcpp-modules.pdf

has not yet enlightened me. I am using roxygen2 for documentation and 
have something like this:

#' @name WKNND
#' @rdname WKNN
#' @exportClass WKNND
#' @export WKNND
WKNND <- setRcppClass("WKNND")

(The full code is here 
https://github.com/jefferis/nabo/blob/master/R/WKNNClasses.R)

which produces this in namespace:

export(WKNND)
exportClasses(WKNND)

along with a sensible looking WKNN.Rd file (here 
https://github.com/jefferis/nabo/blob/master/man/WKNN.Rd )

but check gives:

* checking for missing documentation entries ... WARNING
Undocumented S4 classes:
   'WKNND' 'WKNNF'
All user-level objects in a package (including S4 classes and methods)
should have documentation entries.

I have tried using library(Rcpp);prompt( WKNNF, "man/WKNNF-module.Rd" ) 
but that produces documentation appropriate to a generic module but not 
specifically a class.

Many thanks for any suggestions, pointers to packages that might do this 
etc!

Greg.

--
Gregory Jefferis, PhD                   Tel: 01223 267048
Division of Neurobiology
MRC Laboratory of Molecular Biology
Francis Crick Avenue
Cambridge Biomedical Campus
Cambridge, CB2 OQH, UK

http://www2.mrc-lmb.cam.ac.uk/group-leaders/h-to-m/g-jefferis
http://jefferislab.org
http://flybrain.stanford.edu


More information about the Rcpp-devel mailing list