Re: [Rcpp-devel] Converting std::cout to Rcpp::Rcout automatically

2014-05-25 Thread Qiang Kou
Thank you for the reply! It seems that I have to modify manually if I want to upload to CRAN On Sat, May 24, 2014 at 12:53 PM, Romain François wrote: > Hi, > > I used to redirect std::cout to Rcpp::Rcout back when I still had Rcout in > Rcpp11. e.g. > https://github.com/Rcpp11/Rcpp11/blob/22cc4

Re: [Rcpp-devel] Converting std::cout to Rcpp::Rcout automatically

2014-05-23 Thread Romain François
Hi, I used to redirect std::cout to Rcpp::Rcout back when I still had Rcout in Rcpp11. e.g. https://github.com/Rcpp11/Rcpp11/blob/22cc410ea87a2668e547acf6510d07ca812dfca8/src/Rcpp11_init.cpp Which was basically leveraging std::cout.rdbuf. A variant of http://stackoverflow.com/questions/10150

Re: [Rcpp-devel] Converting std::cout to Rcpp::Rcout automatically

2014-05-23 Thread Kevin Ushey
find . -name "*.cpp" -exec sed -i 's/std::cout/Rcpp::Rcout/g' {} \; This, or some variant, should get you there. I suggest version controlling your files before executing, just in case ;) Kevin On May 23, 2014 7:22 PM, "Dirk Eddelbuettel" wrote: > > On 23 May 2014 at 21:22, Qiang Kou wrote: >

Re: [Rcpp-devel] Converting std::cout to Rcpp::Rcout automatically

2014-05-23 Thread Dirk Eddelbuettel
On 23 May 2014 at 21:22, Qiang Kou wrote: | I am using Rcpp to integrate an available C++ library with R. | | Since the std::cout and std::cerr are not permitted when uploading to CRAN, I | have to modify files manually. It will be somewhat laborious if the library  | | Does anyone have any idea h

[Rcpp-devel] Converting std::cout to Rcpp::Rcout automatically

2014-05-23 Thread Qiang Kou
Hi, dear all, I am using Rcpp to integrate an available C++ library with R. Since the std::cout and std::cerr are not permitted when uploading to CRAN, I have to modify files manually. It will be somewhat laborious if the library Does anyone have any idea how can I do that automatically? Thank