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
lugin = "Rcpp" )
>
> both work.
>
> From: [email protected]
> on behalf of Simon Zehnder
>
> Sent: 28 October 2013 13:58
> To: [email protected]
> Subject: [Rcpp-devel] inlin
ature(start="vector"), body = 'using namespace Rcpp;
NumericVector x(start); return wrap(1);', plugin = "Rcpp" )
both work.
From: [email protected]
on behalf of Simon Zehnder
Sent: 28 Octobe
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