Skip to content
Prev 4883 / 10988 Next

[Rcpp-devel] "No matching function for call to as(double&)" error at compile time

Le 06/12/12 05:57, Robert A'gata a ?crit :
Of course you get a compile error. I'm sure it was explicit enough. I get :

foo.cpp:7: error: no matching function for call to ?as(double&)?

which should give you enough of a clue.


The argument for as is a SEXP :

      template <typename T> T as( SEXP m_sexp)

and NumericVector::operator[](int) gives you a reference to a double

Romain