Re: [R] C++ and R interface

2007-11-06 Thread Deepankar Basu
Thanks for the help. On Tue, 2007-11-06 at 14:48 -0200, Alberto Monteiro wrote: > Deepankar Basu wrote: > > > > I am trying to do an ML estimation in R. My likelihood function has > > several nested loops and so it takes a lot of time (days when I use the > > genetic algorithm for optimization) f

Re: [R] C++ and R interface

2007-11-06 Thread Alberto Monteiro
Deepankar Basu wrote: > > I am trying to do an ML estimation in R. My likelihood function has > several nested loops and so it takes a lot of time (days when I use the > genetic algorithm for optimization) for the optimization to finish. > Unable to avoid loops, I am thinking of writing the likeli

Re: [R] C++ and R interface

2007-11-06 Thread Prof Brian Ripley
On Tue, 6 Nov 2007, Deepankar Basu wrote: > Hi All, > > I am trying to do an ML estimation in R. My likelihood function has > several nested loops and so it takes a lot of time (days when I use the > genetic algorithm for optimization) for the optimization to finish. > Unable to avoid loops, I am

Re: [R] C++ and R interface

2007-11-06 Thread Ingmar Visser
Yes, this can be done and the call is the same, however the C++ needs to be indicated as , see details in the writing R extensions manual. hth, Ingmar On 6 Nov 2007, at 17:05, Deepankar Basu wrote: > Hi All, > > I am trying to do an ML estimation in R. My likelihood function has > several neste

[R] C++ and R interface

2007-11-06 Thread Deepankar Basu
Hi All, I am trying to do an ML estimation in R. My likelihood function has several nested loops and so it takes a lot of time (days when I use the genetic algorithm for optimization) for the optimization to finish. Unable to avoid loops, I am thinking of writing the likelihood function in C++ and