开发者

HashMap as return value from Java method in R?

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 i开发者_Go百科nto 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜