title: How to convert Rcpp::List to std::vector<double>
body: <p>I'm a newcomer in the field of R langauge, but I need to compute singular value decomposition via irlba in my C++ code. For this purpose I use RInside lib.</p>
  
  <pre><code>RInside R(argc, argv); 
  std::string cmd = "S&lt;-diag(3)";
  R.parseEval(cmd);
  R.parseEval("B&lt;-svd(S,nu=dim(S)[1],nv=dim(S)[2])");
  Rcpp::List V ((SEXP)R.parseEval("B$v"));
  </code></pre>
  
  <p>Now I need to convert my results from Rcpp::List with singular vectors to std::vector</p>
  
  <p>Question:
  What is the best way to convert results of performing svd to the std::vector?</p>
  
  <p>How can I transform my input matrix written as std::vector to the format appropriate for using it as an input parameter for svd function in irlba?</p>