Skip to content
Back to formatted view

Raw Message

Message-ID: <7C93310F4A444631A3F03FF595901947@epfl.ch>
Date: 2013-05-10T15:40:24Z
From: Julien Duvanel
Subject: [Rcpp-devel] [RCPP Sugar] sapply function

Hello again,  

I hope I don't disturb you too much. I have again a small question. I haven't seen the answer on your vignette, maybe this is not possible. Here's what I would like to do :

double Foo(double x, double a1, double a2) {
return f(x,a1,a2);
}

NumericVector myVec;

sapply(myVec, Foo(  ??, a1, a2)); // This is the line not working

In every example I saw, Foo (in the example, it's sometimes square) could only have one parameter (and in my case I have many parameters).

Is it possible ? Am I missing something ?

Thank you very much (again) for your time,

Have a nice evening/week-end,

Julien

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130510/9e71d3ed/attachment.html>