Re: [Rcpp-devel] RFC -- Function for making modules ala inline

2011-03-18 Thread Christian Gunning
On Fri, Mar 18, 2011 at 5:34 AM, Dirk Eddelbuettel wrote: > > Christian, > > Thanks for (re-)posting this. Do you have an example use with an example > module, or maybe with one of the unit tests? Not the most minimal example, but it should give you some idea... ## begin example mm1= matrix(1:40

Re: [Rcpp-devel] R Embedded in a class function

2011-03-18 Thread CESAR PERNALETE
Hi Davor. Thanks for your response. Yes, the problem is the creation of an embedded R instance inside a method. Attached there is a simplified example of the way i tried. As a context, i'm using NOMAD (http://www.gerad.ca/nomad/Project/Home.html), an optimization tool where the constraints

Re: [Rcpp-devel] using RApi inC/C++

2011-03-18 Thread Dirk Eddelbuettel
On 18 March 2011 at 19:39, nandan amar wrote: | Dear All, | I am trying to use Some R api in c code. | To start with I copied following code and try to run as | | | a:~/Desktop/rcpp$ g++ file.cpp | | i got following error | | r.cpp:1: fatal error: R.h: No such file or directory | compilation t

[Rcpp-devel] using RApi inC/C++

2011-03-18 Thread nandan amar
Dear All, I am trying to use Some R api in c code. To start with I copied following code and try to run as a:~/Desktop/rcpp$ g++ file.cpp i got following error r.cpp:1: fatal error: R.h: No such file or directory compilation terminated. How should I compile the code. file.cpp

Re: [Rcpp-devel] RFC -- Function for making modules ala inline

2011-03-18 Thread Dirk Eddelbuettel
Christian, Thanks for (re-)posting this. Do you have an example use with an example module, or maybe with one of the unit tests? When I started with RcppBDT I did use cxxfunction() via its include=txt argument but I haven't done much that way. I won't have a lot of time poking around to see i

[Rcpp-devel] RFC -- Function for making modules ala inline

2011-03-18 Thread Christian Gunning
Dear all, Nothing earth-shattering here, but I think this could provide a nice addition to the "rapid prototype" family. I'm not sure if/where it might live, and would appreciate any comments/suggestions to those ends. Attached is tested code -- a module-creation function that's mostly a subset