Re: [Rcpp-devel] One main needs to call a few other functions

2011-10-21 Thread Christian Gunning
On Thu, Oct 20, 2011 at 7:58 PM, wrote: > to me the concern exists whether the other > function is in a package or not, how would a call be made to an outside > compiled object code from within Rcpp. This is a pretty confusing sentence(s). Clearer questions tend to elicit clearer answers :) > M

Re: [Rcpp-devel] Misunderstanding about sugar

2011-10-21 Thread Davor Cubranic
On October 20, 2011 07:58:34 PM Michael Hannon wrote: > Greetings. I'm trying to bootstrap my way into Rcpp. I have the > impression that the "Sugar" extension to Rcpp allows one to use R syntax > to run a substantial subset of Rcommands within C++ I think a more correct statement would be that

Re: [Rcpp-devel] Misunderstanding about sugar

2011-10-21 Thread Dirk Eddelbuettel
On 21 October 2011 at 11:23, Davor Cubranic wrote: | On October 20, 2011 07:58:34 PM Michael Hannon wrote: | > Greetings. I'm trying to bootstrap my way into Rcpp. I have the | > impression that the "Sugar" extension to Rcpp allows one to use R syntax | > to run a substantial subset of Rcommands

[Rcpp-devel] Initialization through constructor or through assignment?

2011-10-21 Thread Douglas Bates
Perhaps this is an indication that I should read some sections of "C++ Annotations" again. I am trying to remember the pros and cons of initializing a class instance in C++ through assignment or through the copy constructor. So, for example, if I have a class "foo" and a function "bar" that retur

Re: [Rcpp-devel] Initialization through constructor or through assignment?

2011-10-21 Thread Dirk Eddelbuettel
On 21 October 2011 at 15:12, Douglas Bates wrote: | Perhaps this is an indication that I should read some sections of "C++ | Annotations" again. I am trying to remember the pros and cons of | initializing a class instance in C++ through assignment or through the | copy constructor. So, for examp

Re: [Rcpp-devel] Initialization through constructor or through assignment?

2011-10-21 Thread Dirk Eddelbuettel
Here is a slightly better setup with an 'empty' function which allows us to get an idea of the cost of the additional statements: either the copy constructor or the constructor. R> suppressMessages(require(inline)) R> suppressMessages(require(rbenchmark)) R> suppressMessages(require(microbenchmar