Just a short follow up to the list.
It turns out that the strange behavior I was experiencing had nothing to do
with cout and cerr, but ostreams in general. For some reason, at a minimum,
the operators:
ostream& operator<< (long& val );
ostream& operator<< (double& val );
were not functioning prop
Thanks, Simon,
That link may prove to be very useful. I think what I can do is make a
similar version of a buffer to one in that example and then have it
conditionally write to Rprintf or cout and/or REprintf or cerr,
depending on whether I'm running a c++ program from the command line
or launching
Sean,
just to clarify - this is not about something "not working" or any leaks.
cout/cerr do exactly what they are supposed to, it's just in most cases not
what you want. The main reason is that R does not necessarily use stdin/stdout
so cout/cerr may have nothing to do with the R console outpu
This is a good idea as to converting to stringstream's because it
could let me remove cout and cerr from the equation. At the moment, I
get that feeling from the experts that having cout and cerr is causing
a bug by not mixing with R. I have other cases where algorithms that
avoid cout and cerr are
On 6 May 2011 at 22:09, Simon Urbanek wrote:
| Sean,
|
| the path form the console is not under your control and it depends heavily on
the internal settings in R (is console enabled, is R interactive, is the output
a tty or a file ...) - that's why you have to use Rprint/REprintf - that's the
Sean,
the path form the console is not under your control and it depends heavily on
the internal settings in R (is console enabled, is R interactive, is the output
a tty or a file ...) - that's why you have to use Rprint/REprintf - that's the
only path that is guaranteed to work. Anything else
Hi,
Thanks for the comments so far.
I've been going through the code extensively and seem to be having trouble
reproducing what R is doing, so this confuses me. For example, when I write
out the pointer values for ptr_R_WriteConsole type functions, I can't find a
function that matches what is act
On 2011-05-06, at 11:41 AM, Dirk Eddelbuettel wrote:
> | I¹m trying to call some of my c++ code from R and seem to be having an issue
> | with streams, although that¹s just one obvious sign of something different
> | in performance between calling the same function from main in c++ vs.
> | calling
On 6 May 2011 at 14:21, Sean Robert McGuffee wrote:
| Hi,
|
| Sorry, I just tried posting this but I had it in the wrong format of text,
| so this is a cleared format repost:
|
| I¹m trying to call some of my c++ code from R and seem to be having an issue
| with streams, although that¹s just one
Hi,
Sorry, I just tried posting this but I had it in the wrong format of text,
so this is a cleared format repost:
I¹m trying to call some of my c++ code from R and seem to be having an issue
with streams, although that¹s just one obvious sign of something different
in performance between calling
10 matches
Mail list logo