Re: [Rcpp-devel] Possible regression in R-3.2.3 or Rcpp 0.12.3

2016-02-01 Thread Jonathan Olmsted
Any reason not to get it from RcppCore/Rcpp? History shows the fix was pulled in: https://github.com/RcppCore/Rcpp/commits/master On my end, I just installed Rcpp via > install_github("RcppCore/Rcpp") and then re-installed openxlsx from CRAN via > install.packages("openxlsx") The script I ha

Re: [Rcpp-devel] List of Lists to List of Vectors

2015-05-04 Thread Jonathan Olmsted
Embedded link was < https://github.com/RevolutionAnalytics/rmr2/blob/master/pkg/src/t-list.cpp> On Mon, May 4, 2015 at 7:39 AM, Dirk Eddelbuettel wrote: > > On 3 May 2015 at 21:29, Antonio Piccolboni wrote: > | Check here for something similar to Tim's solution that preallocates all > > Please

Re: [Rcpp-devel] R session crashes when largely using a Rcpp sourced function

2014-10-08 Thread Jonathan Olmsted
ur help, and if you're interested I could describe > you in details the goals of this code (i guess it's not the purpose of tis > list) > I'll let you know! > > Pierre > > > Jonathan Olmsted a écrit : > > > Pierre, >> >> Have you used a to

Re: [Rcpp-devel] R session crashes when largely using a Rcpp sourced function

2014-10-07 Thread Jonathan Olmsted
Pierre, Have you used a tool like Valgrind? There is a bit of a learning curve, but it is exceedingly useful. A few comments: 1) For cases likes this gctortute(TRUE) in your R script helps those “for enough iterations in a loop…” bugs to present quickly. With gctorture(TRUE) I’m producing the cr

Re: [Rcpp-devel] Package Rcpp: Question conerning source code of cpp files and related question

2014-09-30 Thread Jonathan Olmsted
​Hi, Martin. > 1) Is there a way to see the source file of the "final" cpp-file? (I mean > is it possible to see how the //-lines are replaced and what soureCpp does?) > ​The code generation that happens behind the scenes can be made explicit with sourceCpp(file = "crossp.cpp", verbose = TRUE)

Re: [Rcpp-devel] parallel distance matrix calculation

2014-07-11 Thread Jonathan Olmsted
James, My attempt at marginal usefulness (compared to DE and JJE's comments) would be to offer some code examples that I've got using OpenMP--based parallelism. There are examples in the gallery, of course. But I've got a number of others for euclidean distance and one for an EM algorithm. If you

Re: [Rcpp-devel] Local .h files and Rcpp attributes

2013-10-23 Thread Jonathan Olmsted
I just wanted to jump in here. Mark, I'm going to email you off the list to chat about a Gallery post. It looks like we wanted to know roughly the same thing at roughly the same time. For this email, I just wanted to allay fears amongst the helpers that their help in the last week on this topic w

Re: [Rcpp-devel] Rcpp Makevars COPYING policy?

2013-10-15 Thread Jonathan Olmsted
Finally, some closure... Romain, as you sensed, I did not *really* need linking. Of course, I did not realize that earlier. You were completely right to point in the direction of registering functions. And, while I wish this was some new feature, it's been in R for a *long* time. How the answer co

[Rcpp-devel] Rcpp Makevars COPYING policy?

2013-10-15 Thread Jonathan Olmsted
Dirk and Romain (in the order listed in the file mentioned below), Intellectual property rights confuse the heck out of me so I wanted to ask explicitly before stepping on any toes. Rcpp is GPL-2. However, the Makevars in the ./src/ directory don't necessarily carry the same license header as your

Re: [Rcpp-devel] Error compiling Rcpp 0.10.4

2013-09-12 Thread Jonathan Olmsted
s later with hopefully some positive results. > > > > Best > > > > Simon > > > > On Sep 12, 2013, at 5:47 PM, Jonathan Olmsted > wrote: > > > >> Any idea where that is coming from? It isn't coming from the Rcpp > Makevars or from

Re: [Rcpp-devel] Error compiling Rcpp 0.10.4

2013-09-12 Thread Jonathan Olmsted
Any idea where that is coming from? It isn't coming from the Rcpp Makevars or from a default Macports installation (as best as I can tell). I just did an clean install of R from a clean Macports and then installed Rcpp from within R. g++ -dynamiclib -Wl,-headerpad_max_install_names -undefined dyna

Re: [Rcpp-devel] Favourite Rcpp examples for newbies ?

2013-08-01 Thread Jonathan Olmsted
n, NJ 08544 t: 609.258.6202 f: 609.258.1110 jolms...@princeton.edu http://about.me/olmjo - On Thu, Aug 1, 2013 at 11:31 AM, Jonathan Olmsted wrote: > Just my quick thoughts: > > Bayesian MCMC is what brought me to Rc

Re: [Rcpp-devel] Favourite Rcpp examples for newbies ?

2013-08-01 Thread Jonathan Olmsted
Just my quick thoughts: Bayesian MCMC is what brought me to Rcpp. So, I have always found those examples the most compelling. This is precisely because good R coding can't improve performance on these problems and the gain in computational performance really justified the development cost as oppos

Re: [Rcpp-devel] Segfault error during simulation in Rcpp

2013-05-16 Thread Jonathan Olmsted
Rcpp. Multiple C++ functions are created, only some are exposed to R. It seems like you'd probably do something similar. -Jonathan > | On Thu, May 16, 2013 at 8:11 PM, Dirk Eddelbuettel > wrote: > | > | > | On 16 May 2013 at 14:49, Jonathan Olmsted wrote: > |

Re: [Rcpp-devel] Segfault error during simulation in Rcpp

2013-05-16 Thread Jonathan Olmsted
Several things. Xiao, Dirk's code gives me a segfault immediately and reliably. All, when I do this whole song and dance using the "old" Rcpp/inline/cxxfunction approach, I don't have any issues. One obvious difference you can see (like was mentioned) in the generated code (visibile using verbose

Re: [Rcpp-devel] Segfault error during simulation in Rcpp

2013-05-16 Thread Jonathan Olmsted
Ditto Kevin's comment. I segfault no matter what. > sessionInfo() R version 2.15.3 (2013-03-01) Platform: x86_64-apple-darwin12.3.0/x86_64 (64-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datase

Re: [Rcpp-devel] Sample function(s) for inclusion in RcppArmadillo

2013-03-29 Thread Jonathan Olmsted
Yup. Progress was waiting on finalizing behavior of sample(). Current status is visible here: https://github.com/olmjo/rcpp-gallery/blob/gh-pages/src/2013-03-19-using-the-Rcpp-based-sample-implementation.Rmd -Jonathan - J.P

Re: [Rcpp-devel] NumericVector Double mismatch when indexing an array

2012-09-25 Thread Jonathan Olmsted
Jeff and List, I was interested in the same fairly recently. The full shebang is here < http://www.rochester.edu/college/gradstudents/jolmsted/blog/2012/08/22/rcpp-rng-performance/>. I, unlike you, found some difference between the various approaches. If I had to guess why we come up with differe

Re: [Rcpp-devel] Where is R.h and the other header files?

2012-08-26 Thread Jonathan Olmsted
Liu, A couple of initial reactions. The location of the R.h header is platform dependent. On what platform are you working? You can always just paste the output of the R function "sessionInfo()". Next, the Rcpp team strongly recommends using an "inline"-based approach where possible and an R pack