Re: [Rcpp-devel] Dispatch on sparse and dense matrices...

2013-12-08 Thread Kevin Ushey
I think the safest bet would be to handle dispatch at the R level, which would then call your internal C++ implementations. At least, it would be easier / cleaner. Otherwise, you're right, you need to perform an 'ad-hoc' dispatch based on the internal type / class and such. -Kevin On Sun, Dec 8,

Re: [Rcpp-devel] Dispatch on sparse and dense matrices...

2013-12-08 Thread Søren Højsgaard
Thanks, Dirk! Follow up: That also means (I guess) that to be on the safe side I should write a check-function that will check that the INTSXP and REALSXP really is a matrix, i.e. that it has a dim attribute; right? Or are there facilities for that? Cheers Søren -Original Message- F

Re: [Rcpp-devel] Dispatch on sparse and dense matrices...

2013-12-08 Thread Dirk Eddelbuettel
Hi Søren, On 8 December 2013 at 21:47, Søren Højsgaard wrote: | Dear all, | | I want to do some computation on a matrix, irrespective of whether it is a numeric matrix, an integer matrix or a sparse matrix (a dgCMatrix which can be handled with RcppEigen). For simplicity, I want to compute the

[Rcpp-devel] Dispatch on sparse and dense matrices...

2013-12-08 Thread Søren Højsgaard
Dear all, I want to do some computation on a matrix, irrespective of whether it is a numeric matrix, an integer matrix or a sparse matrix (a dgCMatrix which can be handled with RcppEigen). For simplicity, I want to compute the sum of the elements. To do so I use a template template SEXP do

Re: [Rcpp-devel] [ANN] RcppArmadillo 0.3.930.0

2013-12-08 Thread Dirk Eddelbuettel
On 7 December 2013 at 15:04, Dirk Eddelbuettel wrote: | | Conrad released Armadillo 3.930 yesterday; I rolled it up for CRAN as well | but it is not yet released on the CRAN side. [1] | | In the meantime you get versions from my site at | | http://dirk.eddelbuettel.com/code/rcpp/RcppArmadillo

Re: [Rcpp-devel] RcppEigen needs 1GB memory to compile

2013-12-08 Thread Dominick Samperi
Is this really the important thing? Seems like -g0 saves disk space, not memory? (Loading the symbols into a debugger may require lots of memory, but that is not the issue here.) Header-only C++ packages require the compiler to effectively process one huge source file instead of a bunch of smaller

[Rcpp-devel] R, RStudio, Rcpp Appreciation

2013-12-08 Thread Thell Fowler
Many times we [devs & users] get into a zone and go on extended binges into our own projects neglecting the niceties of society. Then, while either still on a particular path or even when we reach our destination, we don't directly state our appreciation for those special individuals whose project