/* 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!