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

Christian Gunning xian at unm.edu
Thu Dec 6 13:18:18 CET 2012


> /* up to the above line, everything compiles.
> Now I want to get a double out from first element of test.*/
>
> double test0 = Rcpp::as<double>(test[0]);

Does this work?
double test0 = test[0];

In general, including a self-contained minimal example helps.
sourceRcpp() makes this trivial.

-Christian
-- 
A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal – Panama!


More information about the Rcpp-devel mailing list