[Rcpp-devel] error when formal argument name begins with an underscore
JJ Allaire
jj.allaire at gmail.com
Sun Feb 24 17:00:54 CET 2013
>
> experimenting, i ran into this problem that i haven't seen documented:
> if a formal argument to an [[Rcpp::export]] function *begins* with an
> underscore. sourceCpp() ends in failure. with the example below,
> replacing "_parms" with "parms" makes sourceCpp() happy. in the error
> case, the message is:
>
That's because R itself doesn't allow object names to start with "_". Since
sourceCpp is simply transposing all C++ names into R this naturally fails.
See:
http://cran.r-project.org/doc/manuals/R-intro.html#R-commands_003b-case-sensitivity-etc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130224/382cd519/attachment-0001.html>
More information about the Rcpp-devel
mailing list