rJava

Low-level R to Java interface
Download

rJava Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Simon Urbanek
  • Publisher web site:
  • http://www.rforge.net/rJava/index.html
  • Operating Systems:
  • Mac OS X
  • File Size:
  • 330 KB

rJava Tags


rJava Description

Low-level R to Java interface rJava is a simple R-to-Java low-level interface, very much like .C/.Call and friends. Allows creation of objects, calling methods and accessing fields.rJava provides a low-level bridge between R and Java (via JNI). rJava allows to create objects, call methods and access fields of Java objects from R. Requirements: · Java 1.4 or later What's New in This Release: new exception handling was introduced: · Java exceptions are mapped to Exception conditions which can be used to catch the exception at R level. The class name (without package path) of the exception is used as the subclass of Exception such that targetted handlers can be used: tryCatch(.jnew("foo"), NoClassDefFoundError=function(e) ...) · In addition JNI code now causes an error instead of a warning, however, some errors internal to JNI may not have an associated Java exception and thus will fire the usual simpleError condition. · As a consequence of the new error handling exception objects are now supplied in e$jobj of the handler and .jgetEx() becomes obsolete. · added new high-level API using the "J" function. It replaces the previously used .J()/.jrnew() and .jrcall(). · New Java objects are created using new(J("class"), ...) and static methods and fields are accessed using J("class")$... The corresponding implementation uses reflection in all cases. · An additional class jclassName was created to support static calls to accessor methods such as $ and calls to new(). · added with.jclassName and within.jclassName to support "with" semantics on static fields and methods of java classes · added (unexported) isJavaArray function to check if a "jobjRef" or a "jarrayRef" really refers to a java array · added length.jarrayRef to query the number of objects in a java array. An exception is generated if the object is not an array · added "length" pseudo field for java arrays in syntactic sugar and with semantics R-style indexing of java arrays using added japply to apply over a java array or an implementation of the Iterable interface · added str.jarrayRef as an alias to show.jarrayRef · .jcast gains arguments "check" and "convert.array". Their default value is FALSE for backwards compatibility with previous releases of rJava


rJava Related Software