Skip to content
Prev 6314 / 10988 Next

[Rcpp-devel] Help with accessing and manipulating List objects

Le 16/08/13 14:48, Tal Galili a ?crit :
String should know how to do that. I'd recommend you to use String, 
which is an Rcpp class rather than std::string.

For example a String knows what to do with an int:

#include <Rcpp.h>
using namespace Rcpp ;

// [[Rcpp::export]]
String strings(){
     String s( 5 ) ;
     return s ;
}

 > strings()
[1] "5"