Re: [Rcpp-devel] Exporting rcpp-based function into parLapply workers in an R package

2021-05-14 Thread Michael Weylandt
k for Rcpp-based functions. Another option is using >> >clusterEvalQ (as mentioned in the shared post); however, I am not sure >> >if >> >CRAN likes to see the library(package name) inside the codebase. What >> >are >> >your thoughts? >> > >>

Re: [Rcpp-devel] Exporting rcpp-based function into parLapply workers in an R package

2021-05-14 Thread Michael Weylandt
Hi Naeem, My (very quick) guess is that this isn't an Rcpp problem per se, but a parLapply problem. You need to explicitly load your package on each worker so that functions from it are available. See, e.g., the brief discussion here: https://stackoverflow.com/questions/18357788/parallel-parlappl

Re: [Rcpp-devel] Question on performance

2018-09-22 Thread Michael Weylandt
I don't have time right now, but the offending line is here: https://github.com/jesusfv/Comparison-Programming-Languages-Economics/blob/master/RBC_Rcpp.R#L62 which calls `sourceCpp` repeatedly on each loop iteration. Should be a one line change to move it outside the loop and un-sully the good n

Re: [Rcpp-devel] Rcpp::stop() equivalent of base::stop(..., call.=FALSE)

2018-03-05 Thread Michael Weylandt
t;- as.numeric(x) > } > > do.call(internal_function_name, list(x)) > } > > add2(1:5) > ``` > > > > > On Mon, Mar 5, 2018 at 4:35 PM, Michael Weylandt > wrote: >> >> Hi, >> >> Is there any (easy) way to get Rcpp::stop() to behave li

[Rcpp-devel] Rcpp::stop() equivalent of base::stop(..., call.=FALSE)

2018-03-05 Thread Michael Weylandt
Hi, Is there any (easy) way to get Rcpp::stop() to behave like base::stop(..., call.=FALSE)? That is, to just print the error message (possibly preceded by "Error: ") without the name of the calling function. Right now, the error message produced by an Rcpp::stop call returns info about the calle

Re: [Rcpp-devel] rpois returns double?

2015-04-25 Thread Michael Weylandt
> On Apr 24, 2015, at 23:58, Christian Gunning wrote: > > Quick question, mainly out of curiousity. I get that Rcpp uses the R api on > the backend, and in the R api, R::rpois returns a double (and Rcpp::rpois > returns NumericVector). The R C code doesn't offer much in the way of > explanat

Re: [Rcpp-devel] Rcpp Google summer of code 2013?

2013-03-17 Thread Michael Weylandt
There's an active R-GSOC bunch and I'm sure a good Rcpp project would get support that way. Dirk has sponsored GSOC projects in the past so I bet you wouldn't have too much trouble finding a mentor. ;-) http://rwiki.sciviews.org/doku.php?id=developers:projects:gsoc2013 And a mailing list off goo

Re: [Rcpp-devel] Testing for existence of named components

2012-03-29 Thread R. Michael Weylandt
On Thu, Mar 29, 2012 at 2:18 PM, Dirk Eddelbuettel wrote: > > On 29 March 2012 at 18:51, Patrick Burns wrote: > | On 29/03/2012 18:33, Dirk Eddelbuettel wrote: > | > > | > On 29 March 2012 at 19:12, Romain Francois wrote: > | > | Le 28/03/12 13:56, Ulrich Bodenhofer a écrit : > | > |>  Hi, > | > |