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

Qiang Kou qkou at umail.iu.edu
Mon May 26 06:50:25 CEST 2014


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
<romain at r-enthusiasts.com>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/22cc410ea87a2668e547acf6510d07ca812dfca8/src/Rcpp11_init.cpp
>
> Which was basically leveraging std::cout.rdbuf.
> A variant of
> http://stackoverflow.com/questions/10150468/how-to-redirect-cin-and-cout-to-files
>
> And then just using std::cout; Of course then you get CRAN complaining.
>
> Romain
>
> 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 you!
>
> Best,
>
> KK
>
> --
> Qiang Kou
> qkou at umail.iu.edu
> School of Informatics and Computing, Indiana University
>
>  _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
>
>


-- 
Qiang Kou
qkou at umail.iu.edu
School of Informatics and Computing, Indiana University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20140526/111da572/attachment.html>


More information about the Rcpp-devel mailing list