Re: [Rcpp-devel] Error in Module

2014-04-08 Thread Brötje David
Thanks for your answers. Now it works both as package and with sourceCpp. David ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Re: [Rcpp-devel] Distribution of Rcpp11 codebase

2014-04-08 Thread Martyn Plummer
On Tue, 2014-04-08 at 10:48 +0200, Romain François wrote: > Hello Martyn, > > Thanks for joining the discussion; > > Le 8 avr. 2014 à 10:36, Martyn Plummer a écrit : > > > And another 2 cents from me. > > > > A package is the basic unit of functionality in R. Whatever > > functionality you a

Re: [Rcpp-devel] Fwd: Looping over the parameters of a function

2014-04-08 Thread Hao Ye
Hi Petre, It sounds like what you want is to curry a function f(x, a) into a function g(x) that will then get passed to your root-finder. See: http://stackoverflow.com/questions/152005/how-can-currying-be-done-in-c Best, -- Hao Ye h...@ucsd.edu On Apr 8, 2014, at 8:36 AM, Petre Caraiani wrote:

[Rcpp-devel] Fwd: Looping over the parameters of a function

2014-04-08 Thread Petre Caraiani
I don't know how to change the parameters of the function. The Brent routine finds the root of a function depending just on x. I know how to pass a vector between R and C, but I want to pass it to the function, while having the function depending on variable x only. On Tuesday, April 8, 2014, Dir

Re: [Rcpp-devel] Looping over the parameters of a function

2014-04-08 Thread Dirk Eddelbuettel
On 8 April 2014 at 16:41, Petre Caraiani wrote: | I have a code in C which computes the root of a function using the Brent | algorithm. The code is attached below. I provided the full code but you can | focus on the function definition and the main program. I can call this program | from R. What I

[Rcpp-devel] Looping over the parameters of a function

2014-04-08 Thread Petre Caraiani
Hello everybody, I have a code in C which computes the root of a function using the Brent algorithm. The code is attached below. I provided the full code but you can focus on the function definition and the main program. I can call this program from R. What I am interested in is looping over the pa

Re: [Rcpp-devel] Generic R and C++ discussion

2014-04-08 Thread Smith, Dale (Norcross)
As a user of Rcpp, with an interest in using R and C++ together, I would prefer that we have this discussion without rancor. I'm subscribing to both lists because * Rcpp works for me. I haven't upgraded since I don't want the hassle until the end of the year. * Other ideas may work better. I d

Re: [Rcpp-devel] Error in Module

2014-04-08 Thread Romain François
Hello, Just sourceCpp the .cpp file and use the functions verbatim: > sourceCpp( "/tmp/mod.cpp" ) > bar(2L) [1] 4 If you really want to use the module as an object, you have to pick it up from the right spot: > yada <- Module("yada", where = tail(getLoadedDLLs(), 1)[[1]] ) > yada$hello() [

Re: [Rcpp-devel] Generic R and C++ discussion

2014-04-08 Thread Romain Francois
Le 8 avr. 2014 à 13:28, stat quant a écrit : > Hi, > Will that be ok to ask Rcpp questions to on this list too? > Definitely. Anything R and C++ related. > On 8 Apr 2014 09:56, "Romain François" wrote: > Hello, > > I have created a new mailing list (as a google group) for general discussio

[Rcpp-devel] [ANN] BH 0.4.200.0

2014-04-08 Thread Dirk Eddelbuettel
The BH package -- which provides a solid subset of Boost in a header-only package for use by R, with or even without Rcpp. I had gotten a recent email pointing out that a noise compiler warning was indeed a bug in (upstream) Boost 1.51.0 which has been fixed. I have moved to 1.54.0 -- and this i

Re: [Rcpp-devel] Error in Module

2014-04-08 Thread Dirk Eddelbuettel
On 8 April 2014 at 09:00, Brötje David wrote: | This happens all the time with modules. Did I overlook something or | what am I doing wrong? This may not work from command-line use. Our vignette and other documentation stresses use in a package. Please consider that. Your example is pretty th

Re: [Rcpp-devel] Distribution of Rcpp*11* codebase

2014-04-08 Thread Dirk Eddelbuettel
(Subject line repaired) On 8 April 2014 at 08:36, Martyn Plummer wrote: | And another 2 cents from me. | | A package is the basic unit of functionality in R. Whatever | functionality you are providing, I think a package is the best way to | deliver it. There is a well developed framework for ver

Re: [Rcpp-devel] Distribution of Rcpp codebase

2014-04-08 Thread Romain François
Le 8 avr. 2014 à 11:47, Rainer M Krug a écrit : > Romain François writes: > >> Le 8 avr. 2014 à 10:51, Rainer M Krug a écrit : >> >>> Martyn Plummer writes: >>> And another 2 cents from me. A package is the basic unit of functionality in R. Whatever functionality you a

Re: [Rcpp-devel] Distribution of Rcpp codebase

2014-04-08 Thread Rainer M Krug
Romain François writes: > Le 8 avr. 2014 à 10:51, Rainer M Krug a écrit : > >> Martyn Plummer writes: >> >>> And another 2 cents from me. >>> >>> A package is the basic unit of functionality in R. Whatever >>> functionality you are providing, I think a package is the best way to >>> deliver i

Re: [Rcpp-devel] Distribution of Rcpp codebase

2014-04-08 Thread Romain François
Le 8 avr. 2014 à 10:51, Rainer M Krug a écrit : > Martyn Plummer writes: > >> And another 2 cents from me. >> >> A package is the basic unit of functionality in R. Whatever >> functionality you are providing, I think a package is the best way to >> deliver it. There is a well developed framewo

[Rcpp-devel] Generic R and C++ discussion

2014-04-08 Thread Romain François
Hello, I have created a new mailing list (as a google group) for general discussions about R and C++. https://groups.google.com/forum/#!forum/r-and-cpp Shame that it had to come to this, but apparently Rcpp-devel is only for discussing the Dirk approved implementation of Rcpp. Personally, I

Re: [Rcpp-devel] Distribution of Rcpp codebase

2014-04-08 Thread Rainer M Krug
Martyn Plummer writes: > And another 2 cents from me. > > A package is the basic unit of functionality in R. Whatever > functionality you are providing, I think a package is the best way to > deliver it. There is a well developed framework for versioning, > dependency resolution, testing, and dis

Re: [Rcpp-devel] Distribution of Rcpp codebase

2014-04-08 Thread Romain François
Hello Martyn, Thanks for joining the discussion; Le 8 avr. 2014 à 10:36, Martyn Plummer a écrit : > And another 2 cents from me. > > A package is the basic unit of functionality in R. Whatever > functionality you are providing, I think a package is the best way to > deliver it. There is a we

Re: [Rcpp-devel] Distribution of Rcpp codebase

2014-04-08 Thread Martyn Plummer
And another 2 cents from me. A package is the basic unit of functionality in R. Whatever functionality you are providing, I think a package is the best way to deliver it. There is a well developed framework for versioning, dependency resolution, testing, and distribution. If you choose some other

Re: [Rcpp-devel] Distribution of Rcpp codebase

2014-04-08 Thread Romain François
Le 8 avr. 2014 à 10:12, Xavier Robin a écrit : > My 2 cents... > > On 07/04/14 10:12, Romain François wrote: >> It would also mean many copies of the same code base. To which I’m thinking: >> so what. > No, it will mean many copies of /many different and mostly outdated/ code > bases. Still:

Re: [Rcpp-devel] Distribution of Rcpp codebase

2014-04-08 Thread Xavier Robin
My 2 cents... On 07/04/14 10:12, Romain François wrote: It would also mean many copies of the same code base. To which I’m thinking: so what. No, it will mean many copies of /many different and mostly outdated/ code bases. You can count on me to forget to git pull next time I update my packag

Re: [Rcpp-devel] Mailing list scope (was: Distribution of Rcpp codebase)

2014-04-08 Thread Darren Cook
> I though this mailing list was about discussing R and C++, but > apparently I was wrong. Fair enough if this is just Rcpp related. > Perhaps I’ll leave the mailing list as I’m not that interested in > Rcpp anymore. If you start a new mailing list, whether specifically for Rcpp11, or on the gener

[Rcpp-devel] Error in Module

2014-04-08 Thread Brötje David
Hello, I want to expose a C++ class to R through Rcpp. For that I want to try out a few examples from the note "Exposing C++ functions and classes with Rcpp modules" and the book "Seamless R and C++ Integration with Rpp". But I can't manage to get them work. It ends up with an error. So this