[Rd] Controlling stdin and stdout in an embedded R instance

From: Mike Sonsini <msonsini_at_harmonia.com>
Date: Thu, 16 Jun 2011 18:47:43 -0400


I am very new to R but my question is with respect to the C API for working with an embedded R console. I have been able to start and stop an embedded R console from within a C program as well as use the API to execute commands in it. I am seeking a mechanism to individually send native R commands to an embedded console and then consume the output of these commands. Specifically, I cannot send a set of commands to the embedded console and then consume all of the output after the execution completes. I have unsuccessfully attempted to assign values to the ptr_R_ReadConsole and ptr_R_WriteConsole function pointers defined in Rinterface.h but do not know if this is a valid approach. I am working in Ubuntu 10.04 and thus the Windows example at the following address is not applicable.


Does anyone on this list have experience or an example of communicating with an embedded R console using native R commands and consuming the output one command at a time in a "Unix-alike" environment?

Thank you,
Mike Sonsini

R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 17 Jun 2011 - 06:52:30 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 17 Jun 2011 - 20:00:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive