Skip to content
Prev 1812 / 10988 Next

[Rcpp-devel] passing function

On 2011-01-26, at 7:38 AM, Dirk Eddelbuettel wrote:

            
[...]
I think the question was about the line 'Function f(fun)'. 

And the answer is that 'fun' is the second argument of the C++ function, and is an SEXP for the R function passed in. (See the 'signature' call in assignment to 'funx'.) So 'Function f(fun)' creates an instance of Rcpp::Function called 'f' out of the 'fun' SEXP.

Davor