[Rcpp-devel] passing function

2011-01-25 Thread Siddhartha Chib
Is it possible to pass a user defined function written in R for use in rccparma. For example, is it possible to have a function SEXP myfunction(SEXP g, SEXP a) where g is a function object and a is a matrix, the argument of g? Thanks in advance. ___ R

Re: [Rcpp-devel] passing function

2011-01-26 Thread Siddhartha Chib
Thanks. I did not understand this code # C++ source code to operate on function and vector cpp<- ' int n = as(N); NumericVector numvec(xvec) ; Function f(fun) ; for( int i=0; i On 25 January 2011 at 12:01, Siddhartha Chib wrote: | Is it possible to pass a user defined

Re: [Rcpp-devel] passing function

2011-01-26 Thread Siddhartha Chib
Thanks. I did not understand this code # C++ source code to operate on function and vector cpp<- ' int n = as(N); NumericVector numvec(xvec) ; Function f(fun) ; for( int i=0; i On 25 January 2011 at 12:01, Siddhartha Chib wrote: | Is it possible to pass a user defined

[Rcpp-devel] how to use functions from other packages

2011-04-23 Thread Siddhartha Chib
This is likely to be too simple a question perhaps. How does one use specific functions from other packages when working with Rcpp? For that matter, is it possible to use R functions such as optim in Rcpp? Thanks in advance, Siddhartha. ___ Rcpp-d

Re: [Rcpp-devel] how to use functions from other packages

2011-04-24 Thread Siddhartha Chib
the problem be? Thanks in advance on both scores. Siddhartha. On 4/23/2011 9:25 PM, Dirk Eddelbuettel wrote: On 23 April 2011 at 21:05, Dirk Eddelbuettel wrote: | | On 23 April 2011 at 20:36, Siddhartha Chib wrote: | | This is likely to be too simple a question perhaps. How does one use specific