[Rd] R and Java ? [forwarded]
Martin Maechler <firstname.lastname@example.org>
Wed, 10 May 2000 08:18:33 +0200 (CEST)
This is of broader interest,
and I'm not the expert..
------- start of forwarded message -------
From: Cheryl J Fernandes <email@example.com>
Subject: Re R and Java
Date: Tue, 9 May 2000 13:54:35 -0500 (CDT)
I'm Cheryl Fernandes currently pursuing my Masters Of Computer Science
at the university of Illinois, at Chicago.
I have tried and tried but just cannot manage to find teh solutuon to teh
My question is: Can R be interfaced with Java. ??
My dilemma: I'm trying to run the RGui program in WintNT from a Java
application. i;m using runtime.exec()
It opens teh program but after that nothing happens. After opening teh
program i'm passing some commands to R via java's process
OutputStreamWriter. But it does NOT respond to any of teh commands not
even by giving an exception.
Coudl u please let me know if i can pass commandline commands to RGui from
within Java or are there special API's that are available. I know for a
fact taht Java does NOT have API's for R. It does have special interface
API for major programs
like C. Excel, MS-Word
Any help would be greatly appreciated.
The code for the above is:
Runtime rt = Runtime.getRuntime();
String strCmdTmp ="";
strCmdTmp = "Z:\\R\\rw1000\\bin\\Rgui ";
Process jproc= rt.exec(strCmdTmp);
OutputStreamWriter o = new OutputStreamWriter(jproc.getOutputStream());
BufferedReader reader = new BufferedReader(new
while((line = reader.readLine())!=null)
System.out.println(" The line is: " +line);
Thanks in advance,
Cheryl Fernandes (Home): (312) 432 4396, (630) 834 3796
1926 W Harrison Street, (Office): (312) 996 4605
Medical Center Apartments,
Chicago, IL 60612
------- end of forwarded message -------
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: firstname.lastname@example.org