[Rcpp-devel] What is the "correct" way to print text to R with Rcpp?
Dirk Eddelbuettel
edd at debian.org
Tue Oct 18 15:06:41 CEST 2011
On 18 October 2011 at 16:52, Slava Razbash wrote:
| What is the "correct" way to print text to R with Rcpp? I find that
| "std::cout<<" will only work if i running R from a console. I am using
| winXP.
See the manual 'Writing R Extensions' which ships with R.
Rcpp, as an extension to R, is governed by R's rules, and one of those is to
_not_ mix input/output streams. So Tim is exactly correct in suggesting
Rprintf, upon which Jelmer's interesting looking solution is based to.
Dirk
--
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx
More information about the Rcpp-devel
mailing list