[Rcpp-devel] How to use "ff" package in Rcpp?

2014-07-30 Thread Thomas Tse
Hello, bigmemory is not availabe in Windows, so I have to use ff (http://cran.r-project.org/web/packages/ff/index.html) for big data ... is there a way that I could reference ff object within Rcpp? Thanks, Thomas Tse ___ Rcpp-devel mailing list Rcpp-d

Re: [Rcpp-devel] Rf_integrate?

2014-07-30 Thread Silkworth,David J.
The code from Yixuan is exactly what I dreamed might be found. This will suit my needs perfectly. Thank you. ___ 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] Rf_integrate?

2014-07-30 Thread Yixuan Qiu
Hi Dave, I wrote a small wrapper Rcpp_integrate(), which simplifies the interface to the R internal function Rdqags. Basically you need to define your own integrand and parameters passed to that function. Thanks to the default arguments introduced in C++, in most cases you only need to specify four

Re: [Rcpp-devel] Rf_integrate?

2014-07-30 Thread Dirk Eddelbuettel
On 30 July 2014 at 15:23, Qiang Kou wrote: | In my opinion, RcppGSL may be a good choice. Seconded. GSL has a bit on (numeric) integration. However it also uses plain C interfaces to you may start to miss C++ ... There are a number of quadrature packages on CRAN so maybe one of those can help t

Re: [Rcpp-devel] Rf_integrate?

2014-07-30 Thread Qiang Kou
In my opinion, RcppGSL may be a good choice. If you are using Weibull distribution, there is a *gsl_ran_weibull_pdf()* in GSL [1]. Best, KK [1] https://www.gnu.org/software/gsl/manual/html_node/The-Weibull-Distribution.html#The-Weibull-Distribution On Wed, Jul 30, 2014 at 3:15 PM, Silkworth,D

[Rcpp-devel] Rf_integrate?

2014-07-30 Thread Silkworth,David J.
I have a current project desire to move something like R's integrate function inside a loop in Rcpp code. The performance hit to call back to R seems to kill the advantage of Rcpp in the first place. Actually my integrand is t*pdf(t), very similar indeed to pweibull which integrates pdf(t). I