<div dir="ltr">Thank you for the reply! <div><br></div><div>It seems that I have to modify manually if I want to upload to CRAN</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, May 24, 2014 at 12:53 PM, Romain François <span dir="ltr"><<a href="mailto:romain@r-enthusiasts.com" target="_blank">romain@r-enthusiasts.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hi, </div><div><br></div><div>I used to redirect std::cout to Rcpp::Rcout back when I still had Rcout in Rcpp11. e.g. <a href="https://github.com/Rcpp11/Rcpp11/blob/22cc410ea87a2668e547acf6510d07ca812dfca8/src/Rcpp11_init.cpp" target="_blank">https://github.com/Rcpp11/Rcpp11/blob/22cc410ea87a2668e547acf6510d07ca812dfca8/src/Rcpp11_init.cpp</a></div>
<div><br></div><div>Which was basically leveraging std::cout.rdbuf. </div><div>A variant of <a href="http://stackoverflow.com/questions/10150468/how-to-redirect-cin-and-cout-to-files" target="_blank">http://stackoverflow.com/questions/10150468/how-to-redirect-cin-and-cout-to-files</a></div>
<div><br></div><div>And then just using std::cout; Of course then you get CRAN complaining. </div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Romain</div></font></span><div><br><blockquote type="cite"><div>
<div class="h5"><div dir="ltr">Hi, dear all,<div><br></div><div>I am using Rcpp to integrate an available C++ library with R.</div><div><br></div><div>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 </div>


<div><br></div><div>Does anyone have any idea how can I do that automatically?</div><div><br></div><div>Thank you!</div><div><br></div><div>Best,</div><div><br></div><div>KK<br><div><div><br></div>-- <br><div dir="ltr">Qiang Kou<div>

<a href="mailto:qkou@umail.iu.edu" target="_blank">qkou@umail.iu.edu</a><br><div>School of Informatics and Computing, Indiana University</div>
<div><br></div></div></div>
</div></div></div></div></div><div class="">
_______________________________________________<br>Rcpp-devel mailing list<br><a href="mailto:Rcpp-devel@lists.r-forge.r-project.org" target="_blank">Rcpp-devel@lists.r-forge.r-project.org</a><br><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a></div>
</blockquote></div><br></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Qiang Kou<div><a href="mailto:qkou@umail.iu.edu" target="_blank">qkou@umail.iu.edu</a><br><div>School of Informatics and Computing, Indiana University</div>
<div><br></div></div></div>
</div>