Oops, so this would be better:
library(Rcpp)
cppFunction("int x(NumericVector start) {
return 1;
}")
Hadley
On Mon, Oct 28, 2013 at 12:29 PM, Romain Francois
wrote:
> Just a warning that this code creates a NumericVector of length 1 initialised
> with 0.
>
> 1 is not a NumericVector so the c
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
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
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
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
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