Description Usage Arguments Details Value See Also Examples

`.jsimplify`

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

1 |

`o` |
arbitrary object |

`promote` |
logical, if |

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.

Simple scalar or `o`

unchanged.

1 2 3 4 5 6 | ```
## Not run:
i <- .jnew("java/lang/Integer", as.integer(10))
print(i)
print(.jsimplify(i))
## End(Not run)
``` |

rJava documentation built on May 29, 2018, 5:05 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.