Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

javaImport

Attach mechanism for java packages


Description

The javaImport function creates an item on R's search that maps names to class names references found in one or several "imported" java packages.

Usage

javaImport(packages = "java.lang")

Arguments

packages

character vector containing java package paths

Value

An external pointer to a java specific UserDefinedDatabase object

Warning

This feature is experimental. Use with caution, and don't forget to detach.

Note

Currently the list of objects in the imported package is populated as new objects are found, not at creation time.

Author(s)

Romain Francois <francoisromain@free.fr>

References

User-Defined Tables in the R Search Path. Duncan Temple Lang. December 4, 2001 http://www.omegahat.net/RObjectTables/

See Also

Examples

## Not run: 
	attach( javaImport( "java.util" ), pos = 2 , name = "java:java.util" )
	
	# now we can just do something like this 
	v <- new( Vector )
	v$add( "foobar" )
	ls( pos = 2 )
	
	# or this
	m <- new( HashMap )
	m$put( "foo", "bar" )
	ls( pos = 2 )
	
	# or even this :
	Collections$EMPTY_MAP

## End(Not run)

rJava

Low-Level R to Java Interface

v1.0-4
LGPL-2.1
Authors
Simon Urbanek <simon.urbanek@r-project.org>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.