Re: [Rcpp-devel] plugin in a package - how is it registered?

2013-10-11 Thread JJ Allaire
Simon, To make a plugin available for use with both inline and Rcpp attributes you need only define a function named "inlineCxxPlugin" within your package (which can in turn call Rcpp.plugin.maker). This allow you to use it with inline as well as Rcpp::depends. I think this is the scenario you ar

Re: [Rcpp-devel] plugin in a package - how is it registered?

2013-10-11 Thread Dirk Eddelbuettel
Simon, On 11 October 2013 at 23:43, Simon Zehnder wrote: | I have a very short question in regard to plugins in packages. I have written my own plugin using Rcpp.plugin.maker (very well documented in FAQ btw). | | I know, that on the command line calling registerPlugin() registers the plugin.

[Rcpp-devel] plugin in a package - how is it registered?

2013-10-11 Thread Simon Zehnder
Dear Rcpp::Users and Rcpp::Devels, I have a very short question in regard to plugins in packages. I have written my own plugin using Rcpp.plugin.maker (very well documented in FAQ btw). I know, that on the command line calling registerPlugin() registers the plugin. From RcppArmadillo I can see,

Re: [Rcpp-devel] calling R function triggers tryCatch() ???

2013-10-11 Thread Dirk Eddelbuettel
On 11 October 2013 at 10:50, Hadley Wickham wrote: | The maintainer is very responsive so I'm sure he'd be happy to accept a patch Yes, I had a number of emails with Olaf in the past. | or even just a feature request. Ratio of medians sounds reasonable to me, | although you do have enough data

Re: [Rcpp-devel] Armor, Shield and Shelter.

2013-10-11 Thread Kevin Ushey
I agree with Dale; it would be good to see these functions in Rcpp. -Kevin On Fri, Oct 11, 2013 at 6:57 AM, Smith, Dale (Norcross) wrote: > Romain, > > I don't think I have any use for your proposed code at this time. However, I > would like to say that reducing the number of macro calls is a w

Re: [Rcpp-devel] calling R function triggers tryCatch() ???

2013-10-11 Thread Hadley Wickham
The maintainer is very responsive so I'm sure he'd be happy to accept a patch or even just a feature request. Ratio of medians sounds reasonable to me, although you do have enough data to actually do some statistical, tests, rankings etc. Hadley On Friday, October 11, 2013, Dirk Eddelbuettel wrot

Re: [Rcpp-devel] calling R function triggers tryCatch() ???

2013-10-11 Thread Dirk Eddelbuettel
On 11 October 2013 at 09:24, Hadley Wickham wrote: | FYI, I recommend using microbenchmark which uses a much higher | precision timer so you can see the variability as well as the mean | times. Someone really needs to mod it to give the 'single figure of merit' comparison which makes rbenchmark s

Re: [Rcpp-devel] calling R function triggers tryCatch() ???

2013-10-11 Thread Romain Francois
I will give some concretes next week. For now, i just wanted to hint: - mean is a mammoth. Try applying mean_ : mean_ <- function(.) .Internal(mean(.)) - by using x(r,_) you are allocating memory at each loop iteration, when we can use just one vector, since all rows are by definition of the s

Re: [Rcpp-devel] calling R function triggers tryCatch() ???

2013-10-11 Thread Hadley Wickham
Interestingly, that shows that rowApply2 is actually slightly _slower_ than rowApply1. Hadley On Fri, Oct 11, 2013 at 9:24 AM, Hadley Wickham wrote: > FYI, I recommend using microbenchmark which uses a much higher > precision timer so you can see the variability as well as the mean > times. Also

Re: [Rcpp-devel] calling R function triggers tryCatch() ???

2013-10-11 Thread Hadley Wickham
FYI, I recommend using microbenchmark which uses a much higher precision timer so you can see the variability as well as the mean times. Also note that you can use /*** R */ to include R code that's automatically run when benchmarking: https://gist.github.com/hadley/6935459 That gives: > microben

Re: [Rcpp-devel] Armor, Shield and Shelter.

2013-10-11 Thread Smith, Dale (Norcross)
Romain, I don't think I have any use for your proposed code at this time. However, I would like to say that reducing the number of macro calls is a worthy goal. My own attitude is "build it and they will use it". Dale Smith, Ph.D. Senior Financial Quantitative Analyst Financial & Risk Managemen

Re: [Rcpp-devel] Armor, Shield and Shelter.

2013-10-11 Thread Romain Francois
Le 11/10/13 13:26, Dirk Eddelbuettel a écrit : Romain, On 11 October 2013 at 13:03, Romain Francois wrote: | Anyway, I'd like to propose adding Shield, Armor and Shleter to Rcpp. Sure. | This is a non disruptive proposal as the template classes I propose | don't interract with the rest of the

Re: [Rcpp-devel] Armor, Shield and Shelter.

2013-10-11 Thread Dirk Eddelbuettel
Romain, On 11 October 2013 at 13:03, Romain Francois wrote: | Anyway, I'd like to propose adding Shield, Armor and Shleter to Rcpp. Sure. | This is a non disruptive proposal as the template classes I propose | don't interract with the rest of the code. We might not use them in | Rcpp, but we

[Rcpp-devel] Armor, Shield and Shelter.

2013-10-11 Thread Romain Francois
Hello, As usual when I work on some packge that use Rcpp, I come up with ideas. On dplyrRcpp I've defined these classes to handle stack based protection of objects from the GC. These are thin wrappers around PROTECT / UNPROTECT / PROTECT_WITH_INDEX Sometimes, the Rcpp api classes don't quite

Re: [Rcpp-devel] RcppOctave on Windows: testing needed

2013-10-11 Thread Renaud Gaujoux
Many thanks for this nice joint investigation work! There certainly still are things to check and tweak to get the package run smoothly and robustly on Mac (and Windows), but this is a great advance! Coming next: * a README file with instructions on how to build/install on these platforms. I w