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

2014-02-26 Thread Thell Fowler
I'm getting:: *** Error in `/usr/lib/rstudio/bin/rsession': malloc(): smallbin double linked list corrupted: 0x03436090 ***-- It is a small class for iterative compositions. It looks like there's a bad_alloc between the R and C++ sides of things but I'm not quite sure what to check on it

[Rcpp-devel] Bug when using #' @title Hello world

2014-02-26 Thread Dieter Menne
Hi, I feel guilty that I am a Windows user, and that I am using RStudio, both of which is not welcome here. At least the latter is probably not guilty here. Before looking at the details, I had reported it on the RStudio list, because I thought it was a problem with roxygen. To reproduce: --

Re: [Rcpp-devel] Bug when using #' @title Hello world

2014-02-26 Thread Dirk Eddelbuettel
On 26 February 2014 at 16:53, Dieter Menne wrote: | Hi, Welcome to the Rcpp list. | I feel guilty that I am a Windows user, and that I am using RStudio, both | of which is not welcome here. Can we leave the trolling out and concentrate on Rcpp isssues here? This list has worked quite well

Re: [Rcpp-devel] Bug when using #' @title Hello world

2014-02-26 Thread JJ Allaire
Dieter, Try locating the roxygen right above the function you want to document (rcpp_hello_world). If you do that then it will be placed next to that function in the .R file (when you have "standalone" roxygen within a C++ file then it's automatically associated with a NULL object in the .R file).

[Rcpp-devel] rollapply

2014-02-26 Thread Hideyoshi Maeda
Hi Rcpp devel list, One of the functions I like to use is zoo’s rollapply() function. However sometimes this can be slow as it is basically a long loop using mapply. Given how fast loops are in C++ this seems like this would be the perfect thing to covert into C++, BUT, one of the benefits of r

[Rcpp-devel] Bug when using #' @title Hello world

2014-02-26 Thread Dieter Menne
JJ Allaire wrote: >>Try locating the roxygen right above the function you want to document >>(rcpp_hello_world). If you do that then it will be placed next to that >>function in the .R file (when you have "standalone" roxygen within a C++ file >>then it's automatically associated with a NULL ob

Re: [Rcpp-devel] rollapply

2014-02-26 Thread Dirk Eddelbuettel
On 26 February 2014 at 16:23, Hideyoshi Maeda wrote: | Hi Rcpp devel list, | | One of the functions I like to use is zoo’s rollapply() function. However sometimes this can be slow as it is basically a long loop using mapply. | | Given how fast loops are in C++ this seems like this would be the

Re: [Rcpp-devel] rollapply

2014-02-26 Thread Hideyoshi Maeda
Didn’t even know it existed! will take a look now. Thanks On 26 Feb 2014, at 16:35, Dirk Eddelbuettel wrote: > > On 26 February 2014 at 16:23, Hideyoshi Maeda wrote: > | Hi Rcpp devel list, > | > | One of the functions I like to use is zoo’s rollapply() function. However > sometimes this can b

Re: [Rcpp-devel] Bug when using #' @title Hello world

2014-02-26 Thread Dirk Eddelbuettel
On 26 February 2014 at 11:12, JJ Allaire wrote: | Dieter, | | Try locating the roxygen right above the function you want to document | (rcpp_hello_world). If you do that then it will be placed next to that function | in the .R file (when you have "standalone" roxygen within a C++ file then it's

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

2014-02-26 Thread Dirk Eddelbuettel
Thell, On 26 February 2014 at 09:46, Thell Fowler wrote: | | I'm getting:: | | *** Error in `/usr/lib/rstudio/bin/rsession': malloc(): smallbin double linked | list corrupted: 0x03436090 ***--  | | It is a small class for iterative compositions.  It looks like there's a | bad_alloc bet

Re: [Rcpp-devel] rollapply

2014-02-26 Thread Hideyoshi Maeda
Hi Kevin, I just had a quick look, at RcppRoll and noticed that almost all of the results have a single value as an output, and was wondering if it was possible to be able to get more than one output per loop… to give a quick example, i would be grateful if you could show me how the following

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

2014-02-26 Thread Thell Fowler
resend including list -- Forwarded message -- From: Thell Fowler Date: Wed, Feb 26, 2014 at 12:25 PM Subject: Re: [Rcpp-devel] Exposed class works within cpp func, bombs via module To: Dirk Eddelbuettel On Wed, Feb 26, 2014 at 11:46 AM, Dirk Eddelbuettel wrote: > > Thell, > >

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

2014-02-26 Thread Dirk Eddelbuettel
On 26 February 2014 at 12:26, Thell Fowler wrote: | BTW - what was the fix/issue you tackled yesterday? Possibly any relation? Unrelated, mostly, as it was a for loop with iterators using comparison (wrongly) and arithmetic on the iterator object. In that case using old-school indices worked mo

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

2014-02-26 Thread Thell Fowler
On Wed, Feb 26, 2014 at 12:26 PM, Thell Fowler wrote: > resend including list > > -- Forwarded message -- > From: Thell Fowler > Date: Wed, Feb 26, 2014 at 12:25 PM > Subject: Re: [Rcpp-devel] Exposed class works within cpp func, bombs via > module > To: Dirk Eddelbuettel > > >

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

2014-02-26 Thread Thell Fowler
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 any relation? > > Unrelated, mostly, as it was a for loop with iterators using comparison > (wrongly) and arithmetic on

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

2014-02-26 Thread Thell Fowler
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 any relation? >> >> Unrelated, mostly, as it was a for loop

[Rcpp-devel] Cost of RCPP_EXPOSED_CLASS pre/post population (post substantially lower)

2014-02-26 Thread Thell Fowler
Possibly interesting results; at least to anyone who may typically construct and populate a class in the constructor... > Rcpp::sourceCpp('VectorCreation.cpp') > v1 <- function(len) {v<-make_preVector(len); v$vec } > v2 <- function(len) {v<-make_postVector(); v$populate(len); v$vec } > identica

[Rcpp-devel] Rcpp module support

2014-02-26 Thread KNAG, RALPH H (RALPH H)
I just saw a tweet that said that support for Rcpp modules will be dropped in "Release 11". When will this occur? ___ 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] Rcpp module support

2014-02-26 Thread Dirk Eddelbuettel
On 26 February 2014 at 21:25, KNAG, RALPH H (RALPH H) wrote: | I just saw a tweet that said that support for Rcpp modules will be dropped in | ?Release 11?. | When will this occur? This mailing list is about Rcpp -- whereas the tweet you refer to (if it was the same one I saw) was about Rcpp

Re: [Rcpp-devel] Rcpp module support

2014-02-26 Thread Romain François
Rcpp11 is an alternative implementation of Rcpp indeed. It does not mean discussing it is not suitable to this mailing list. Rcpp11 will be released closely after R 3.1.0, whenever this happens to be. It contains major improvements over Rcpp, will be completely header only (no src/ directory a