jsimplify

0th

Percentile

Converts Java object to a simple scalar if possible

.jsimplify attempts to convert Java objects that represent simple scalars into corresponding scalar representation in R.

Keywords
interface
Usage
.jsimplify(o)
Arguments
o
arbitrary object
Details

If o is not a Java object reference, o is returned as-is. If o is a reference to a scalar object (such as single integer, number, string or boolean) then the value of that object is returned as R vector of the corresponding type and length one.

This function is used by .jfield to simplify the results of field access if required.

Currently there is no function inverse to this, the usual way to wrap scalar values in Java references is to use .jnew as the corresponding constructor.

Value

  • Simple scalar or o unchanged.

See Also

.jfield

Aliases
  • .jsimplify
Examples
i <- .jnew("java/lang/Integer", as.integer(10))
print(i)
print(.jsimplify(i))
Documentation reproduced from package rJava, version 0.9-5, License: GPL-2

Community examples

Looks like there are no examples yet.