Rcpp: end of code conversion