<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Iirc we have mapply2 and mapply3. </div><div><br></div><div>Otherwise you can make Foo a helper class instead of a function. And you embed the 3 variables in your class. </div><div><br></div><div><br></div><div><br>Le 10 mai 2013 à 17:40, Julien Duvanel <<a href="mailto:julien.duvanel@epfl.ch">julien.duvanel@epfl.ch</a>> a écrit :<br><br></div><blockquote type="cite"><div>
                <div>
                    Hello again,
                </div><div><br></div><div>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 :</div><div><br></div><div><i>double Foo(double x, double a1, double a2) {</i></div><div><i><span class="Apple-tab-span" style="white-space:pre">      </span>return f(x,a1,a2);</i></div><div><i>}</i></div><div><i><br></i></div><div><i>NumericVector myVec;</i></div><div><i><br></i></div><div><i>sapply(myVec, Foo(  ……, a1, a2)); // This is the line not working</i></div><div><br></div><div>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).</div><div><br></div><div>Is it possible ? Am I missing something ?</div><div><br></div><div>Thank you very much (again) for your time,</div><div><br></div><div>Have a nice evening/week-end,</div><div><br></div><div>Julien</div><div><br></div>
                <div></div>
            </div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Rcpp-devel mailing list</span><br><span><a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a></span><br><span><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a></span></div></blockquote></body></html>