Documenting open Rcpp modules with roxygen2

I have an Rcpp module in my package which, as well as exposing the class, provides a number of methods. Is it possible to document methods (on the C ++ side) using roxygen2? My module is as follows:

RCPP_MODULE(BayesFst) {
using namespace Rcpp;

class_<BayesFst>( "BayesFst")
.default_constructor("Standard constructor")
.method("printData", &BayesFst::printData)
.method("printCounts", &BayesFst::printCounts)
.method("printInitialPvals", &BayesFst::printInitialPvals)
.method("printFstSummary", &BayesFst::printFstSummary)
.method("run", &BayesFst::run)
.method("setData", &BayesFst::setData)
.method("setPriorParameters", &BayesFst::setPriorParameters)
.method("setRunParameters", &BayesFst::setRunParameters)
.method("ldiriTest", &BayesFst::ldiriTest)
.property("interaction", &BayesFst::getInteraction, &BayesFst::setInteraction)
;

}

I would like to fully document all of these methods. The simple idea is to hide the class behind the wrapper functions and then call the methods from within the wrapper functions of R, but that seems ridiculous to me.

I tried adding roxygen comment lines to the functions, but since they are not exported in the same way that the documentation does not seem to be picked up.

+4
source share
1 answer

Rcpp, roxygen compileAttributes(),... compileAttributes().

( , :) ; roxygen R .

: , .

+6

Source: https://habr.com/ru/post/1664364/


All Articles