Re: [Rcpp-devel] [Rd] must .Call C functions return SEXP?

2010-10-28 Thread Dominick Samperi
On Thu, Oct 28, 2010 at 6:04 PM, Douglas Bates wrote: > On Thu, Oct 28, 2010 at 1:44 PM, Dominick Samperi > wrote: > > See comments on Rcpp below. > > > > On Thu, Oct 28, 2010 at 11:28 AM, William Dunlap > wrote: > >> > >> > -Original Message- > >> > From: r-devel-boun...@r-project.org

Re: [Rcpp-devel] Accessing T of RcppVector

2010-10-28 Thread Dirk Eddelbuettel
Hi Sebastian, You are doing a few things in a rather awkward manner. One thing is that you still stick to what we call the 'classic' API; most of us think you probably want the newer one. Have another look at the Rcpp-introduction vignette in Rcpp 0.8.7 (maybe via the CRAN website). Also some o

Re: [Rcpp-devel] Patch for Reference Class warnings

2010-10-28 Thread Dirk Eddelbuettel
On 28 October 2010 at 09:29, rom...@r-enthusiasts.com wrote: | I thought this has been fixed last week. Can you confirm you get the same warnings from the svn version. Indeed -- works fine for me using current SVN along with Ubuntu 10.10 (where g++ is g++-4., g++-4.5 available as well): ~/t

[Rcpp-devel] Accessing T of RcppVector

2010-10-28 Thread Groß , Sebastian
Hey there, At first please forgive my intrusion into your high level development conversation. But some, in my opinion rather weird, thing occured to me while using the RcppVector class. Maybe it just appears somewhat cloudy to me due to my lack of firm c++ programming experience. To not to beat

Re: [Rcpp-devel] [Rd] must .Call C functions return SEXP?

2010-10-28 Thread Douglas Bates
On Thu, Oct 28, 2010 at 1:44 PM, Dominick Samperi wrote: > See comments on Rcpp below. > > On Thu, Oct 28, 2010 at 11:28 AM, William Dunlap wrote: >> >> > -Original Message- >> > From: r-devel-boun...@r-project.org >> > [mailto:r-devel-boun...@r-project.org] On Behalf Of Andrew Piskorski

Re: [Rcpp-devel] [Rd] must .Call C functions return SEXP?

2010-10-28 Thread Dominick Samperi
See comments on Rcpp below. On Thu, Oct 28, 2010 at 11:28 AM, William Dunlap wrote: > > -Original Message- > > From: r-devel-boun...@r-project.org > > [mailto:r-devel-boun...@r-project.org] On Behalf Of Andrew Piskorski > > Sent: Thursday, October 28, 2010 6:48 AM > > To: Simon Urbanek >

Re: [Rcpp-devel] ambiguous overload for ‘operator[ ]’

2010-10-28 Thread Davor Cubranic
You're mixing NumericVectors, std::vectors, and XPtrs, not to mention using plain C's memcpy to copy C++ objects. Even if it compiled, I'd be surprised if this code worked correctly. If you want to copy pdA into v, you should probably use std::copy with iterators (with v as the target, not pdB

Re: [Rcpp-devel] Patch for Reference Class warnings

2010-10-28 Thread romain
Hi, I thought this has been fixed last week. Can you confirm you get the same warnings from the svn version. Romain Le 28 oct. 2010 à 09:22, Dominick Samperi a écrit : > Under g++ 4.5.0 (MinGW) I get warnings when I compile the World example > that uses reference classes. The example, warni

[Rcpp-devel] Patch for Reference Class warnings

2010-10-28 Thread Dominick Samperi
Under g++ 4.5.0 (MinGW) I get warnings when I compile the World example that uses reference classes. The example, warnings, and a fix in the form of a diff file are attached. This is based on the headers as of Rcpp 0.8.7. Domnick g++ -I"c:/PROGRA~1/R/R-212~1.0/include" -I../inst/include/-O

Re: [Rcpp-devel] Module with out default constructor.

2010-10-28 Thread Andrew Redd
Thanks, I'm taking the approach of the default constructor with an initializer function. That seems to be a reasonable workaround. Oh and BTW I was not using Notepad++ for some reason I was not able to copy and paste from vim into chrome. Notepad++ does great indenting although not quite as good