From roebuck at odin.mdacc.tmc.edu  Thu Nov 18 11:04:35 2004
From: roebuck at odin.mdacc.tmc.edu (Paul Roebuck)
Date: Thu Nov 18 11:04:52 2004
Subject: [Rd] Re: [R] Redirect standard input and output of R
In-Reply-To: <000001c4cd1a$1a69ed90$1035ae86@kakuru>
References: <000001c4cd1a$1a69ed90$1035ae86@kakuru>
Message-ID: <Pine.OSF.4.58.0411180355470.237686@odin.mdacc.tmc.edu>

On Wed, 17 Nov 2004, Victor Robles wrote:

> I'm trying to write a C program that write to the standard input of R
> and read the standard output. I can perfectly read the R output, but
> I'm not able of writing anything to R.
> [SNIP C code]

Several years ago, I wrote some software that used S-plus as its
back-end and Java for the front-end. I found what worked best was
to add a pseudoterminal inbetween; you can use the code from
"UNIX Programming Environment" to create one. The solution was
later reused when a similar project used R for its back-end.

----------------------------------------------------------
SIGSIG -- signature too long (core dumped)


[Rd] Re: [R] Redirect standard input and output of R
Paul Roebuck