Re: [Rcpp-devel] Working with strings

2012-11-18 Thread Romain Francois
Le 18/11/12 15:35, Hadley Wickham a écrit : On Sat, Nov 17, 2012 at 9:23 AM, Romain Francois wrote: Le 17/11/12 15:22, Hadley Wickham a écrit : Hi all, Am I doing something wrong with the functions below, or has this behaviour not yet been implemented in Rcpp? cppFunction('std::string

Re: [Rcpp-devel] Working with strings

2012-11-18 Thread Hadley Wickham
On Sat, Nov 17, 2012 at 9:23 AM, Romain Francois wrote: > Le 17/11/12 15:22, Hadley Wickham a écrit : >> >> Hi all, >> >> Am I doing something wrong with the functions below, or has this >> behaviour not yet been implemented in Rcpp? >> >> cppFunction('std::string first_char(const CharacterVe

Re: [Rcpp-devel] Working with strings

2012-11-17 Thread Romain Francois
Le 17/11/12 15:22, Hadley Wickham a écrit : Hi all, Am I doing something wrong with the functions below, or has this behaviour not yet been implemented in Rcpp? cppFunction('std::string first_char(const CharacterVector x) { return x[0]; }') Ah. > cppFunction('std::string

[Rcpp-devel] Working with strings

2012-11-17 Thread Hadley Wickham
Hi all, Am I doing something wrong with the functions below, or has this behaviour not yet been implemented in Rcpp? cppFunction('std::string first_char(CharacterVector x) { return x[0]; }') cppFunction('CharacterVector miss_c() { return CharacterVector::create(NA_STRING)