Re: [Rcpp-devel] Assignment and extraction from a Vector in a templated function

2010-07-06 Thread Romain Francois
Le 06/07/10 13:14, Romain Francois a écrit : I do plan to have a sugar version of "rev". Actually I think I'll write it right after I press "send". Done in rev 1790. -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://bit.ly/98Uf7u :

Re: [Rcpp-devel] Assignment and extraction from a Vector in a templated function

2010-07-06 Thread Romain Francois
Hi, (just saw I did not pick this one up) It might be one of those cases where we lack a const version of some operator. or maybe the compiler is confused about R_len_t operator[] are defined as: inline Proxy operator[]( const int& i ){ return cache.ref(i) ; } inline Proxy operator[]( const

Re: [Rcpp-devel] Assignment and extraction from a Vector in a templated function

2010-06-30 Thread Dirk Eddelbuettel
Just FYI Rcpp 0.8.3 itself didn't even build on OS X or Solaris according to 'Check Results' page on CRAN -- so we have some work to do there. Windows did build so that would put the blame back onto your code. Unfortunately, debugging (templated) C++ that doesn't work is not the most straightf

[Rcpp-devel] Assignment and extraction from a Vector in a templated function

2010-06-30 Thread Douglas Bates
Apparently I have gotten too fancy in writing a templated function to apply a permutation to Rcpp::Vector classes. The templates are at the end of lme4a/src/MatrixNs.h which can be obtained from R-forge under the lme4 project. One of them is class Permutation { Rcpp::IntegerVector d_