1

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.

1
  • It is a GNU Project, which is similar to S. Commented Mar 18, 2010 at 17:30

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.