Re: [Rcpp-devel] Rcpp syntactic sugar equivalent for R's optimize() function

2014-02-28 Thread Hideyoshi Maeda
I have just noticed that optimize() is already a C function, as is suggested below: > stats::optimize function (f, interval, ..., lower = min(interval), upper = max(interval), maximum = FALSE, tol = .Machine$double.eps^0.25) { if (maximum) { val <- .External2(C_do_fmin, function

Re: [Rcpp-devel] Rcpp syntactic sugar equivalent for R's optimize() function

2014-02-28 Thread Gregor Kastner
Hi Hideyoshi, > Is there a way I can just call that function in Rcpp rather than having to > install new libraries or create my own? (I presume that there is probably a > “C_do_fmin.c” file somewhere that I can use?) This questions has been discussed in this list about a month ago: http://r.7896

Re: [Rcpp-devel] Rcpp syntactic sugar equivalent for R's optimize() function

2014-02-28 Thread Dirk Eddelbuettel
On 28 February 2014 at 11:52, Gregor Kastner wrote: | Hi Hideyoshi, | | > Is there a way I can just call that function in Rcpp rather than having to | > install new libraries or create my own? (I presume that there is probably a | > “C_do_fmin.c” file somewhere that I can use?) | | This question

Re: [Rcpp-devel] Rcpp syntactic sugar equivalent for R's optimize() function

2014-02-28 Thread Romain Francois
Le 28 févr. 2014 à 11:52, Gregor Kastner a écrit : > Hi Hideyoshi, > >> Is there a way I can just call that function in Rcpp rather than having to >> install new libraries or create my own? (I presume that there is probably a >> “C_do_fmin.c” file somewhere that I can use?) > > This questions

Re: [Rcpp-devel] Rcpp syntactic sugar equivalent for R's optimize() function

2014-02-28 Thread Smith, Dale (Norcross)
"In short, this is not trivial." No, it isn't. If you are not completely wedded to optimize(), I would suggest another route. Again, I recommend nlopt or some other package which has the algorithms you need. And you can investigate nloptr if you want to call the routines in that R package as Di

[Rcpp-devel] Pb compilation windows 64 : minGW32 is selected

2014-02-28 Thread Jerome MARQUET
Hello, I developed a Rcpp module which compiles and works fine on linux and win32 but fails to compile on win64. This module makes a "call lib" to a dll compiled with visual and the "R CMD INSTALL" fails during the link process with a message "skipping incompatible NameOFMyLibraryCompile

Re: [Rcpp-devel] Fwd: Exposed class works within cpp func, bombs via module

2014-02-28 Thread Thell Fowler
On Wed, Feb 26, 2014 at 1:48 PM, Thell Fowler wrote: > On Wed, Feb 26, 2014 at 12:56 PM, Thell Fowler wrote: >> On Wed, Feb 26, 2014 at 12:33 PM, Dirk Eddelbuettel wrote: >>> >>> On 26 February 2014 at 12:26, Thell Fowler wrote: >>> | BTW - what was the fix/issue you tackled yesterday? Possibly

Re: [Rcpp-devel] Fwd: Exposed class works within cpp func, bombs via module

2014-02-28 Thread Kevin Ushey
Hi Thell, Thanks for all the work you've done investigating this. Can you please consolidate the information you have and post it as an issue here: https://github.com/RcppCore/Rcpp/issues?state=open? And, if you're willing to dive in and figure out what exactly is happening, patches are much appr

[Rcpp-devel] Rcpp attributes, default values for enums

2014-02-28 Thread Gábor Csárdi
Hi All, it seems that this is currently not supported. For this: // [[Rcpp::export("L_tree")]] NumericMatrix rogdf_tree_layout(GraphAttributes graph, double siblingDistance=20, double subtreeDistance=20, double levelDistance=50, double treeDistance=50, bool orthogonalLayout=false, Orientatio

Re: [Rcpp-devel] Fwd: Exposed class works within cpp func, bombs via module

2014-02-28 Thread Thell Fowler
On Fri, Feb 28, 2014 at 5:28 PM, Kevin Ushey wrote: > Hi Thell, > > Thanks for all the work you've done investigating this. Can you please > consolidate the information you have and post it as an issue here: > https://github.com/RcppCore/Rcpp/issues?state=open? > > And, if you're willing to dive i