[R] Calling R from Java (trying the R interface to Omegahat and Java)

Michael Kubovy kubovy at virginia.edu
Sat Mar 21 04:46:52 CET 2009


Thanks for the tip. I'll start with rJava, and see if that easier  
approach works.

On Mar 20, 2009, at 10:50 PM, Martin Morgan wrote:

> Michael Kubovy <kubovy at virginia.edu> writes:
>
>> Dear R-helpers,
>>
>> I run R version 2.8.1 (2008-12-22) on i386-apple-darwin8.11.1
>>
>> I would like to call R from Java. I downloaded SJava_0.69-0.tar.gz,
>> and then issued the command suggested on http://www.omegahat.org/
>> RSJava/ :
>
> Others will point you to rJava
>
>  http://www.rforge.net/rJava/
>
> which might well be a good solution for you; if you have reasons for
> using SJava, then the currently maintained version is at
>
>  https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/SJava
>
> accessible using 'svn' and the instructions at
>
>  http://wiki.fhcrc.org/bioc/SvnHowTo
>
> It has not been tested recently on a mac...
>
>> % R INSTALL -c SJava_0.69-0.tar.gz
>
> This should be
>
>  R CMD INSTALL --clean SJava_0.69-0.tar.gz
>
>> ARGUMENT 'INSTALL' __ignored__
>>
>> WARNING: unknown option '-c'
>>
>> ARGUMENT 'SJava_0.69-0.tar.gz' __ignored__
>>
>> I then tried
>> % R CMD INSTALL SJava_0.69-0.tar.gz
>> * Installing to library '/Library/Frameworks/R.framework/Resources/
>> library'
>> * Installing *source* package 'SJava' ...
>> checking for java... /usr/bin/java
>> Java VM /usr/bin/java
>> checking for javah... no
>
> you require the JDK (Java Development Kit), not just the JRE (Java
> Runtime Environment); if you've got the right software installed, you
> should be able to find the program 'javah' on your system.
>
> Hope that helps,
>
> Martin
>
>> Sorry. We can currently only configure this package for IBM,  
>> Blackdown
>> or Sun's Java implementation
>> ERROR: configuration failed for package 'SJava'
>> ** Removing '/Library/Frameworks/R.framework/Resources/library/SJava'
>>
>> Can someone tell me what I'm doing wrong? Since this is a matter of
>> some urgency, I would be grateful if you also cc-ed my email address.
>> _____________________________
>> Professor Michael Kubovy
>> University of Virginia
>> Department of Psychology
>> Postal Address:
>> 	P.O.Box 400400, Charlottesville, VA 22904-4400
>> Express Parcels Address:
>> 	Gilmer Hall, Room 102, McCormick Road, Charlottesville, VA 22903
>> Office:    B011;		Phone: +1-434-982-4729
>> Lab:        B019;		Phone: +1-434-982-4751
>> WWW:    http://www.people.virginia.edu/~mk9y/
>> Skype name: polyurinsane
>>
>>
>>
>>
>>
>> 	[[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
> -- 
> Martin Morgan
> Computational Biology / Fred Hutchinson Cancer Research Center
> 1100 Fairview Ave. N.
> PO Box 19024 Seattle, WA 98109
>
> Location: Arnold Building M2 B169
> Phone: (206) 667-2793




More information about the R-help mailing list