Re: [R] R et Java

From: Martin Morgan <mtmorgan_at_fhcrc.org>
Date: Sun 07 May 2006 - 01:22:21 EST

peut-+AOo-tre

http://www.omegahat.org/RSJava/FAQ.html:

Problem:
Trying the example for calling R from Java via

   SJava/scripts/RJava --example --gui-none

(in <RHOME>/library) throws an exception

Solution:
Reinstall SJava using the -c switch, i.e.

  R CMD INSTALL -c SJava_0.62-6.tar.gz

Regards,

Martin

miniar mansouri <miniarmansouri@yahoo.fr> writes:

> Bonjour,
>
> Je developpe une application java et je veux integrer du code R dans mon programme . Le programme de test que j+IBk-ai fait est :
>
>
> import org.omegahat.R.Java.*;
>
> public class REvalSample {
> public static void main(String [] args) {
> String [] rargs = {"--slave", "--vanilla"};
>
> System.out.println("Sample program to call R engine from Java");
> ROmegahatInterpreter interp = new ROmegahatInterpreter(ROmegahatInterpreter.fixArgs(rargs),false);
>
> REvaluator e = new REvaluator();
>
> Object val = e.eval("demo()");
> val = e.eval("x * 2.0");
>
> if (val != null) {
> double[] objects = (double[])val;
> for (int i=0; i<objects.length; i+-+-) {
> System.err.println("("+-i+-") " +- objects[i]);}
>
>
> }
> }
> }
>
>
> Lorsque je compile ce programme j+IBk-obtient les messages d+IBk-erreurs suivants :
>
>
> Loading RInterpreter library
> java.lang.UnsatisfiedLinkError: no RInterpreter in java.library.path
> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
> at java.lang.Runtime.loadLibrary0(Runtime.java:788)
> at java.lang.System.loadLibrary(System.java:834)
> at org.omegahat.R.Java.ROmegahatInterpreter.<clinit>(ROmegahatInterpreter.java:34)
> at rjava.REvalSample.main(REvalSample.java:11)
> Exception in thread "main".
> A mentionner , je travaille avec JBuilderX, et R.2.3.0 ,j+IBk-ai ajouter les packages SJava et rjava +AOA- R mais le probl+AOg-me est toujours pr+AOk-sent.
>
> Aider moi s+IBk-il vous plait c+IBk-est tr+AOg-s urgent .
>
>
>
>
>
> [[alternative HTML version deleted]]

>

> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sun May 07 01:39:31 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sun 07 May 2006 - 04:10:04 EST.

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