[Rd] R-devel does not update the C++ returned variables

2015-03-02 Thread sarah manderni
Hi, Within my R code, I am using a C++ function as below: overlaps <- matrix(0, nrow=B, ncol=length(N)) overlaps.P <- matrix(0, nrow=B, ncol=length(N)) .C("speedUp", D, S, pD, pS, nrow(D), as.integer(N), length(N), ssq[i], i, as.integer(B), overlaps, overlaps.P, DU

Re: [Rd] R-devel does not update the C++ returned variables

2015-03-02 Thread Duncan Murdoch
On 02/03/2015 3:50 AM, sarah manderni wrote: > Hi, > > Within my R code, I am using a C++ function as below: > > overlaps <- matrix(0, nrow=B, ncol=length(N)) > overlaps.P <- matrix(0, nrow=B, ncol=length(N)) > >.C("speedUp", D, S, pD, pS, nrow(D), as.integer(N), length(N),

Re: [Rd] R-devel does not update the C++ returned variables

2015-03-02 Thread Duncan Murdoch
On 02/03/2015 8:46 AM, sarah manderni wrote: Thanks! I went through the online posts which supports the power of .Call over .C. But my probably naive question is why does this work for my code with R but not R-devel? Because of the change mentioned in the NEWS file. And another question is re

Re: [Rd] R-devel does not update the C++ returned variables

2015-03-02 Thread Dirk Eddelbuettel
On 2 March 2015 at 09:09, Duncan Murdoch wrote: | I generally recommend that people use Rcpp, which hides a lot of the | details. It will generate your .Call calls for you, and generate the | C++ code that receives them; you just need to think about the real | problem, not the interface. It h

Re: [Rd] R-devel does not update the C++ returned variables

2015-03-02 Thread sarah manderni
Thanks! I went through the online posts which supports the power of .Call over .C. But my probably naive question is why does this work for my code with R but not R-devel? And another question is related to using .Call. Based on the manual page, I do not need to change the function parameters when

Re: [Rd] R-devel does not update the C++ returned variables

2015-03-02 Thread Martin Maechler
> On 2 March 2015 at 09:09, Duncan Murdoch wrote: > | I generally recommend that people use Rcpp, which hides a lot of the > | details. It will generate your .Call calls for you, and generate the > | C++ code that receives them; you just need to think about the real > | problem, not the interf

Re: [Rd] R-devel does not update the C++ returned variables

2015-03-02 Thread Dirk Eddelbuettel
On 2 March 2015 at 16:37, Martin Maechler wrote: | | > On 2 March 2015 at 09:09, Duncan Murdoch wrote: | > | I generally recommend that people use Rcpp, which hides a lot of the | > | details. It will generate your .Call calls for you, and generate the | > | C++ code that receives them; you ju

Re: [Rd] R-devel does not update the C++ returned variables

2015-03-02 Thread Dénes Tóth
On 03/02/2015 04:37 PM, Martin Maechler wrote: On 2 March 2015 at 09:09, Duncan Murdoch wrote: | I generally recommend that people use Rcpp, which hides a lot of the | details. It will generate your .Call calls for you, and generate the | C++ code that receives them; you just need to think a

Re: [Rd] R-devel does not update the C++ returned variables

2015-03-02 Thread Martin Morgan
On 03/02/2015 11:39 AM, Dirk Eddelbuettel wrote: On 2 March 2015 at 16:37, Martin Maechler wrote: | | > On 2 March 2015 at 09:09, Duncan Murdoch wrote: | > | I generally recommend that people use Rcpp, which hides a lot of the | > | details. It will generate your .Call calls for you, and genera

Re: [Rd] R-devel does not update the C++ returned variables

2015-03-02 Thread Hervé Pagès
Hi, On 03/02/2015 12:18 PM, Dénes Tóth wrote: On 03/02/2015 04:37 PM, Martin Maechler wrote: On 2 March 2015 at 09:09, Duncan Murdoch wrote: | I generally recommend that people use Rcpp, which hides a lot of the | details. It will generate your .Call calls for you, and generate the | C++ c

Re: [Rd] R-devel does not update the C++ returned variables

2015-03-02 Thread Hervé Pagès
On 03/02/2015 01:00 PM, Hervé Pagès wrote: Hi, On 03/02/2015 12:18 PM, Dénes Tóth wrote: On 03/02/2015 04:37 PM, Martin Maechler wrote: On 2 March 2015 at 09:09, Duncan Murdoch wrote: | I generally recommend that people use Rcpp, which hides a lot of the | details. It will generate your .

Re: [Rd] R-devel does not update the C++ returned variables

2015-03-03 Thread Martin Maechler
> Hervé Pagès > on Mon, 2 Mar 2015 13:00:47 -0800 writes: > Hi, > On 03/02/2015 12:18 PM, Dénes Tóth wrote: >> >> >> On 03/02/2015 04:37 PM, Martin Maechler wrote: >>> On 2 March 2015 at 09:09, Duncan Murdoch wrote: | I generally recommend