[Rcpp-devel] Function arguments to R

Sören Vogel soeren.vogel at uzh.ch
Sun May 3 16:41:13 CEST 2015


Hello

I have created a function that I want to expose to R in my package using Rcpp modules:

#include <Rcpp.h>
using namespace Rcpp;
void myfun( Rcpp::List lst, NumericVector vec ) {
	// do something
}
RCPP_MODULE(mymod) {
	function("myfun", &myfun, "Does something.");
}

The documentation file (Rd) of the function list the two formal arguments, lst and vec. However, R CMD CHECK says:

* checking for code/documentation mismatches ... WARNING
Codoc mismatches from documentation object 'myfun':
myfun
  Code: function(...)
  Docs: function(lst, vec)
  Argument names in code not in docs:
    ...
  Argument names in docs not in code:
    lst vec
  Mismatches in argument names:
    Position: 1 Code: ... Docs: lst

How can I fix this?

Thanks
Sören



More information about the Rcpp-devel mailing list