[R] Invoking R from application

Dobedani dobedani at gmx.net
Fri Aug 8 13:00:33 CEST 2008


Dear all,

I'm trying to invoke R from an application which I'm developing. I
have indications that the problem is specific to R. I'm able to e.g.
invoke a Python script in the same way with success, but R is giving
me problems. Last year a guy with nickname vital101 posted a message
on the Java forums website about invoking R from Java. The link to
that thread is:
http://www.java-forums.org/advanced-java/3433-external-program-execution-problems.html#post6970

Unfortunately, he did not report back whether he found a solution at
the time. As I said, I believe the problems he encountered were
specific to R. What he was doing from Java, I'm now trying to do from
C#. And I'm getting exactly the same warnings / errors back from R as
he was getting:
ARGUMENT '<' __ignored__
ARGUMENT 'test.r' __ignored__

FYI: I'm using Windows XP. If I enter the following behind the command
prompt:
C:\Progra~1\R\R-2.7.1\bin\Rterm.exe --slave < test.r
then my script test.r is dealt with correctly, but if I use DotNet
classes Process and StartInfo from the System.Diagnostics namespace,
things go wrong :-(

Does anyone understand what is going wrong here? Pls let me know
something. TIA

Kind regards,
Dobedani



More information about the R-help mailing list