[Rcpp-devel] ListOf -- update

2013-10-28 Thread Kevin Ushey
Hi guys, With some encouragement from Romain, I took a shot at implementing the ListOf class. For now, everything's just in one big .cpp file here (later I can factor it out to .h and .cpp files). But please take a look here: https://gist.github.com/kevinushey/7208681 I took Romain's suggestions

Re: [Rcpp-devel] inline error

2013-10-28 Thread Romain Francois
Just a warning that this code creates a NumericVector of length 1 initialised with 0. 1 is not a NumericVector so the compiler looks for a conversion, the one that is found is the ctor for NumericVector that takes an int. Romain Le 28 oct. 2013 à 17:05, Hadley Wickham a écrit : > FYI, that

Re: [Rcpp-devel] inline error

2013-10-28 Thread Hadley Wickham
FYI, that's equivalent to the somewhat cleaner library(Rcpp) cppFunction("NumericVector x(NumericVector start) { return 1; }") Hadley On Mon, Oct 28, 2013 at 8:58 AM, Simon Zehnder wrote: > Dear Rcpp::Users and Rcpp::Devels, > > I get a weird error when using inline and I want to know, where

Re: [Rcpp-devel] inline error

2013-10-28 Thread Dirk Eddelbuettel
On 28 October 2013 at 14:15, Wray, Christopher wrote: | Its just a typo on plugin (no s). And scope Rcpp::wrap. | | cfunc <- cxxfunction( signature(start="vector"), body = 'Rcpp::NumericVector x(start); return Rcpp::wrap(1);', plugin = "Rcpp" ) | | extra 's' on parameter plugins | | or | | cf

Re: [Rcpp-devel] inline error

2013-10-28 Thread Simon Zehnder
You are right! Too long time in front of my desktop…. Apology! On 28 Oct 2013, at 15:15, Wray, Christopher wrote: > Its just a typo on plugin (no s). And scope Rcpp::wrap. > > cfunc <- cxxfunction( signature(start="vector"), body = 'Rcpp::NumericVector > x(start); return Rcpp::wrap(1);', p

Re: [Rcpp-devel] inline error

2013-10-28 Thread Wray, Christopher
Its just a typo on plugin (no s). And scope Rcpp::wrap. cfunc <- cxxfunction( signature(start="vector"), body = 'Rcpp::NumericVector x(start); return Rcpp::wrap(1);', plugin = "Rcpp" ) extra 's' on parameter plugins or cfunc <- cxxfunction( signature(start="vector"), body = 'using namespace Rc

[Rcpp-devel] inline error

2013-10-28 Thread Simon Zehnder
Dear Rcpp::Users and Rcpp::Devels, I get a weird error when using inline and I want to know, where it comes from. I run the following code: library(Rcpp) library(inline) cfunc <- cxxfunction(signature(start="vector"), body = "Rcpp::NumericVector x(start); return 1;", plugins = "Rcpp”) And I ge