tags:

views:

53

answers:

1

Hi,

is it possible to return a HashMap to R with the rJava extension of R? E.g. I have a method in Java, which returns a HashMap and I want this HashMap use in R. I tried:

.jcall(javaObj, "Ljava/util/HashMap", "getDbInfoMap")

This doesn't work.
Do I have to put everything into a String[], that I want to pass to R from Java? Or is there another possibility?

Any help/info on this would be greatly appreciated.

A: 

You're missing a semi-colon when specifying the HashMap return type.

.jcall(javaObj, "Ljava/util/HashMap;", "getDbInfoMap")

See JNI Types Field Descriptors and examples of .jcall.

nicerobot
Great, thank you very much.
Martin