Re: [Rcpp-devel] Additional parameters for an objective function, e.g. in RcppDE

2013-04-28 Thread Dirk Eddelbuettel
On 29 April 2013 at 14:22, Christoph Bergmeir wrote: | Hi, | | ok, that's exactly the file I was looking at right now. The problem is | that my objective function is implemented in C++, and passed as an | external pointer. So in evaluate.h, instead of in the EvalStandard case | I'm in the Eval

Re: [Rcpp-devel] Additional parameters for an objective function, e.g. in RcppDE

2013-04-28 Thread Christoph Bergmeir
Hi, ok, that's exactly the file I was looking at right now. The problem is that my objective function is implemented in C++, and passed as an external pointer. So in evaluate.h, instead of in the EvalStandard case I'm in the EvalCompiled case, where the environment is not used. My question no

Re: [Rcpp-devel] Additional parameters for an objective function, e.g. in RcppDE

2013-04-28 Thread Dirk Eddelbuettel
On 29 April 2013 at 13:55, Christoph Bergmeir wrote: | Hi, | | thanks Dirk for the prompt reply. Ok, this was also the solution I had | in mind. I'll try to find the code in RcppDE or try to implement it | myself..I'll keep you posted with any advances. I think this may do the trick: demo/env

Re: [Rcpp-devel] Additional parameters for an objective function, e.g. in RcppDE

2013-04-28 Thread Christoph Bergmeir
Hi, thanks Dirk for the prompt reply. Ok, this was also the solution I had in mind. I'll try to find the code in RcppDE or try to implement it myself..I'll keep you posted with any advances. Regards, Christoph On 04/29/2013 01:44 PM, Dirk Eddelbuettel wrote: On 29 April 2013 at 12:37, Chri

Re: [Rcpp-devel] sourceCpp error

2013-04-28 Thread Dirk Eddelbuettel
On 28 April 2013 at 22:20, Subodh Acharya wrote: | Hi, I am a beginner-class use of the amazing Rcpp. I am using to simulate | finite state Markov chains.  | Previously all the c++ function I wrote were working perfectly. I compiled all | my functions in package and they work fine. | | But now af

Re: [Rcpp-devel] Additional parameters for an objective function, e.g. in RcppDE

2013-04-28 Thread Dirk Eddelbuettel
On 29 April 2013 at 12:37, Christoph Bergmeir wrote: | Dear list, | | I'm looking for some advice on a specific problem. Using RcppDE there is | the possibility to give the optimizer directly an external pointer to | the C++ function it will use as the objective function. I found this | mechan

Re: [Rcpp-devel] sourceCpp error

2013-04-28 Thread Kevin Ushey
Hi Subodh, Can you give some more information about your system -- specifically, the output of sessionInfo() in an R session? Also, are you running this from an R session in your terminal, or some other system (RStudio, RKWard etc.) -Kevin On Sun, Apr 28, 2013 at 7:20 PM, Subodh Acharya wrote:

[Rcpp-devel] Additional parameters for an objective function, e.g. in RcppDE

2013-04-28 Thread Christoph Bergmeir
Dear list, I'm looking for some advice on a specific problem. Using RcppDE there is the possibility to give the optimizer directly an external pointer to the C++ function it will use as the objective function. I found this mechanism pretty useful as it may speed up things quite a lot (I have a

[Rcpp-devel] sourceCpp error

2013-04-28 Thread Subodh Acharya
Hi, I am a beginner-class use of the amazing Rcpp. I am using to simulate finite state Markov chains. Previously all the c++ function I wrote were working perfectly. I compiled all my functions in package and they work fine. But now after I updated to Rcpp 0.10.3, whenever I sourceCpp, it throws a

Re: [Rcpp-devel] Remove hard-coded path to /usr/bin in Makevars

2013-04-28 Thread Dirk Eddelbuettel
Just to put closure to this: Thanks to a few more off-list messages with Simon who suggested a nice a improvement on the prior setup based on using an environment variable, plus testing by Valentin, this issue is now taken care of in SVN. Thanks to everybody who helped making Rcpp that little bit