Re: [Rcpp-devel] Matrix: column-major storage?

2012-11-07 Thread Ramon Diaz-Uriarte
Dear Dirk, Doug, and Romain, Thanks a lot for your (very fast ---didn't even have time to have dinner ;-) responses. I was aware of the column-major order in R, but for no reason I was expecting row-major in C++ (but then, I was expecting nrow and ncol to work as they did). I'll play around wit

Re: [Rcpp-devel] Matrix: column-major storage?

2012-11-07 Thread Dirk Eddelbuettel
Hi Ramon, And welcome! On 7 November 2012 at 20:25, Ramon Diaz-Uriarte wrote: | I understand it is not possible to store things in row-major order with | Rcpp Matrix types? In short: No. In more detail, and allow me to quote from Section "5.11.2 Calculating numerical derivatives" in "Writing R

Re: [Rcpp-devel] Matrix: column-major storage?

2012-11-07 Thread Romain Francois
Le 07/11/12 20:25, Ramon Diaz-Uriarte a écrit : Dear All, I've recently started using Rcpp welcome. so maybe this is a trivial question, but I have not been able to find an answer in previous posts or the docs. Rcpp plays with the rules set by R. And R says : column major. I thought tha

Re: [Rcpp-devel] Matrix: column-major storage?

2012-11-07 Thread Douglas Bates
An Rcpp object uses the storage allocated in R hence it has the same column-major ordering of the elements in a matrix. The same is true of matrix objects in RcppArmadillo. Basically anything that uses Lapack and BLAS or calling sequences compatible with Lapack or BLAS uses column-major ordering.

[Rcpp-devel] Matrix: column-major storage?

2012-11-07 Thread Ramon Diaz-Uriarte
Dear All, I've recently started using Rcpp, so maybe this is a trivial question, but I have not been able to find an answer in previous posts or the docs. I thought that, for any of the Matrix types available, if we have x(i, j) then x(i, j + 1) would be contiguous in memory (whereas x(i

Re: [Rcpp-devel] RInside 0.2.9�

2012-11-07 Thread Dirk Eddelbuettel
On 7 November 2012 at 17:08, Danie Fourie wrote: | Hi, | | I am busy writing an dll using RInside (thanx so much for it, it really makes | things easier). It worked fine until I started using RInside 0.2.9, so I switch | back to 0.2.8 which is currently working. I'm using windows and R 2.15.2, I

[Rcpp-devel] RInside 0.2.9‏

2012-11-07 Thread Danie Fourie
Hi, I am busy writing an dll using RInside (thanx so much for it, it really makes things easier). It worked fine until I started using RInside 0.2.9, so I switch back to 0.2.8 which is currently working. I'm using windows and R 2.15.2, I know that you don't really support windows, but there is

Re: [Rcpp-devel] [ANN] RInside 0.2.9

2012-11-07 Thread David Ibarra Gómez
Yes, I already did that, but I didn't try because your first answer (and because I need to upgrade ...). I'll tell you about improvements. Thank you again Dirk. David Ibarra Gomez Jefe de Proyectos -Mensaje original- De: Dirk Eddelbuettel [mailto:e...@debian.org] Enviado el: miérco

Re: [Rcpp-devel] [ANN] RInside 0.2.9

2012-11-07 Thread Dirk Eddelbuettel
On 7 November 2012 at 15:46, David Ibarra Gómez wrote: | , I think that sooner or later I will try the code that abruptly ends the proccess that called RInside with the new "NT" routine and see what happends... I was allready using try-catch but the program ended abruptly anyway... Please l

Re: [Rcpp-devel] [ANN] RInside 0.2.9

2012-11-07 Thread David Ibarra Gómez
, I think that sooner or later I will try the code that abruptly ends the proccess that called RInside with the new "NT" routine and see what happends... I was allready using try-catch but the program ended abruptly anyway... Thank you David Ibarra Gomez Jefe de Proyectos -Mensaje

Re: [Rcpp-devel] [ANN] RInside 0.2.9

2012-11-07 Thread Dirk Eddelbuettel
On 6 November 2012 at 05:21, Dirk Eddelbuettel wrote: | | On 6 November 2012 at 08:30, David Ibarra Gómez wrote: | | it's nice to see how RInside gets even better. I saw the example of the "R.parseEvalQNT(cmd)". I have a question. Is it supposed to work if the cmd command it's correct b

Re: [Rcpp-devel] Using Rcpp without R in a main() function

2012-11-07 Thread Josh.Bowden
Hello Romain, I thought linking to libR would be all that is needed. I have installed RInside, got the example code compiled and substituted my function and it compiled and run. Thanks a lot for the help! Josh. > Hello, > > Rcpp is for calling C++ code from R. Why did you think you can use

Re: [Rcpp-devel] Using Rcpp without R in a main() function

2012-11-07 Thread Romain Francois
Hello, Rcpp is for calling C++ code from R. Why did you think you can use it without R ? Have a look at RInside, which will let you embed R in a c++ application. But no miracle there either, you will still need R. Romain Le 07/11/12 10:12, josh.bow...@csiro.au a écrit : Hi, I am trying t

[Rcpp-devel] Using Rcpp without R in a main() function

2012-11-07 Thread Josh.Bowden
Hi, I am trying to test some code and in doing so I want to call the code from a main() function. The test code is as follows: #include #include #include #include int main(int argc, char* argv[]) { Int arraySize = 1689 ; // read in the test data // Rcpp::NumericVector A