[Rcpp-devel] OT: Boost NT

2013-10-14 Thread Darren Cook
I was taking a look at this new C++ library, going for Boost review soon: (or maybe I misunderstood and only the SIMD sub-library is aiming to be in Boost) http://nt2.metascale.org/doc/html/index.html It looks a bit like trying to port Matlab to C++, with an emphasis on high-level definition of

Re: [Rcpp-devel] Calling an internal do_* C level function

2013-10-14 Thread Romain Francois
Le 14/10/13 21:47, Mark Fredrickson a écrit : Thank you to Romain and Dirk. I've seen some C++ rank implementations, and I'll probably copy one of those. Lastly, not a milligram of Rcpp in this question. Plain R programming questions should go to r-devel, not rcpp-devel. Noted. My apol

Re: [Rcpp-devel] Calling an internal do_* C level function

2013-10-14 Thread Dirk Eddelbuettel
On 14 October 2013 at 14:47, Mark Fredrickson wrote: | Noted. My apologies. I was hoping there was some magic/sugar for this I wish there was. But "they" tend to sprinkle attribute_hidden all over their code preventing us from being able to use it, even though we are already linked to them. |

Re: [Rcpp-devel] Issue with Matrices and Iterators

2013-10-14 Thread Alessandro Mammana
You are right, now the code compiles! But why? I understand that data is stored in column major. However I hoped that using an iterator I would abstract away from how the data is stored and that the function that increases the iterator takes care of increasing the pointer of nrow positions... Than

Re: [Rcpp-devel] Calling an internal do_* C level function

2013-10-14 Thread Mark Fredrickson
Thank you to Romain and Dirk. I've seen some C++ rank implementations, and I'll probably copy one of those. Lastly, not a milligram of Rcpp in this question. Plain R programming > questions should go to r-devel, not rcpp-devel. > Noted. My apologies. I was hoping there was some magic/sugar for th

Re: [Rcpp-devel] Issue with Matrices and Iterators

2013-10-14 Thread Romain Francois
Le 14/10/13 21:21, Alessandro Mammana a écrit : Hi all, I have very little experience with Rcpp and also with c++, so I am sorry if my question might be too stupid. I am trying to use iterators in my code, because I understand them better than vectors, because they should be efficient, and becaus

Re: [Rcpp-devel] Issue with Matrices and Iterators

2013-10-14 Thread Matteo Fasiolo
Hi Ale, maybe I'm wrong but mat(0,_) is not a NumericVector, but a Rcpp::MatrixRow. So your function sum() is being called with arguments of the wront type (the error message is saying that). If instead you select a column mat( _, 0) you have a conversion to a NumericVector. I've encountered the

[Rcpp-devel] Issue with Matrices and Iterators

2013-10-14 Thread Alessandro Mammana
Hi all, I have very little experience with Rcpp and also with c++, so I am sorry if my question might be too stupid. I am trying to use iterators in my code, because I understand them better than vectors, because they should be efficient, and because I should be able to combine different implementa

Re: [Rcpp-devel] Calling an internal do_* C level function

2013-10-14 Thread Dirk Eddelbuettel
On 14 October 2013 at 19:41, Romain Francois wrote: | Most of them are hidden. You can't call them. For example: | | SEXP attribute_hidden do_rank(SEXP call, SEXP op, SEXP args, SEXP rho) | | The attribute_hidden hides the function. If you want this function to be | available as part of the R a

Re: [Rcpp-devel] Calling an internal do_* C level function

2013-10-14 Thread Romain Francois
Le 14/10/13 19:33, Mark Fredrickson a écrit : Hello, Does anyone have an example of calling into C level functions that would be called with .Internal() in R? Specifically, I'd like to call do_rank, as defined in: http://svn.r-project.org/R/trunk/src/main/sort.c These functions have an unusua

[Rcpp-devel] Calling an internal do_* C level function

2013-10-14 Thread Mark Fredrickson
Hello, Does anyone have an example of calling into C level functions that would be called with .Internal() in R? Specifically, I'd like to call do_rank, as defined in: http://svn.r-project.org/R/trunk/src/main/sort.c These functions have an unusual signature, and I'm not sure what headers/linke

Re: [Rcpp-devel] strange new issue with installing Rcpp-0.10.5

2013-10-14 Thread Tim Triche, Jr.
On Mon, Oct 14, 2013 at 10:18 AM, Dirk Eddelbuettel wrote: > > I also run a little script 'update.r' every couple of days which updates > /usr/local/lib/R/site-library/ based on what changed on CRAN (by calling > update.packages(), more or less -- see the examples in the littler package) > and th

Re: [Rcpp-devel] strange new issue with installing Rcpp-0.10.5

2013-10-14 Thread Dirk Eddelbuettel
Tim, On 14 October 2013 at 09:56, Tim Triche, Jr. wrote: | Hi all, | | This is new and perplexing to me.  I have an Ubuntu install of r-base, r-rcpp, Same here, apart from the fact that I tend to build / install Rcpp locally from the repo. And I never have issues. My Ubuntu box is otherwise v

[Rcpp-devel] strange new issue with installing Rcpp-0.10.5

2013-10-14 Thread Tim Triche, Jr.
Hi all, This is new and perplexing to me. I have an Ubuntu install of r-base, r-rcpp, etc. and have installed R-3.0.2 in order to maintain Bioconductor packages for the upcoming release. As of a few days ago, Rcpp stopped updating itself either via biocLite() or via command line installation. I

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

2013-10-14 Thread Dirk Eddelbuettel
On 14 October 2013 at 11:55, Simon Zehnder wrote: | Does anyone have an explanation what is going on and if I might have forgotten something in my code? AFAIK this has nothing to do with Rcpp. When you do foo <- readLines("someFile.txt") you now get the warning, whereas in the past you

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

2013-10-14 Thread Romain Francois
Hello, I've added some of my spices in https://gist.github.com/romainfrancois/6974012 rowApply3 creates a NumericVector of the appropriate dimensions and assign data to it in the loop. Since the dimensions match, the assignment operator will not change the underlying SEXP so the call made b

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

2013-10-14 Thread Simon Zehnder
I would like to continue this thread regarding my latest experience with constructing a plugin for inline: I followed the inline.R file in RcppArmadillo and my function looks now like this one: inlineCxxPlugin <- Rcpp:::Rcpp.plugin.maker( include.befo