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]); It is the above line that the compiler complains about. I have include Rcpp.h and also my -I path includes Rcpp/include directory. I am not sure why I am getting an error here? Or I have to make a copy of SEXP object representing test[0] before passing it into Rcpp::as<double>? Thank you. Best regards, Robert
_______________________________________________ Rcpp-devel mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
