Skip to content
Back to formatted view

Raw Message

Message-ID: <20672.35756.381610.405604@max.nulle.part>
Date: 2012-12-06T12:12:28Z
From: Dirk Eddelbuettel
Subject: [Rcpp-devel] "No matching function for call to as(double&)" error	at compile time
In-Reply-To: <CAA7=MyX26mgJ9vUj8dRTShNfiqvd9iYySxf5iqdmEzgKs2ZpVg@mail.gmail.com>

On 5 December 2012 at 23:57, Robert A'gata wrote:
| Hi,
| 
| I am not sure what I am missing. Any help would be greatly appreciated. I have
| the following code:
| 
| // myList will have column called "a"
| Rcpp::List myList = someInputList;
| Rcpp::NumericVector test = Rcpp::as<Rcpp::NumericVector>(myList["a"]);
| 
| /* 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]);

Try

	double test= test[0];

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com