8 void show(
const Rcpp::List & L) {
10 std::cout <<
"Showing list content:\n";
11 std::cout <<
"L[0] " << Rcpp::as<int>(L[0]) << std::endl;
12 std::cout <<
"L[1] " << Rcpp::as<double>(L[1]) << std::endl;
13 Rcpp::IntegerVector v = Rcpp::as<Rcpp::IntegerVector>(L[2]);
14 std::cout <<
"L[2][0] " << v[0] << std::endl;
15 std::cout <<
"L[2][1] " << v[1] << std::endl;
18 int main(
int argc,
char *argv[]) {
26 Rcpp::IntegerVector v(2); v[0] = 10; v[1] = 11;
30 R[
"myRlist"] = mylist;
31 std::string r_code =
"myRlist[[1]] = 42; myRlist[[2]] = 42.0; myRlist[[3]][2] = 42; myRlist";
int main(int argc, char *argv[])
int parseEval(const std::string &line, SEXP &ans)
void show(const Rcpp::List &L)