Skip to content
Prev 51454 / 63421 Next

JDataFrame API

Hi Simon,

Aha! I re-read your message and noticed this line:

lapply(J("A")$direct(), .jevalArray)

which I had overlooked earlier. I wrote an example that is very
similar to yours and see what you mean now regarding how we can do
this directly.

Many thanks,

T

groovyScript <- paste (
    "def stringList = [] as java.util.List",
    "def numberList = [] as java.util.List",
    "for (def ctr in 0..99) { stringList << new String(\"TGIF $ctr\");
numberList << ctr; }",
    "def strings = stringList.toArray()",
    "def numbers = numberList.toArray()",
    "def result = [strings, numbers]",
    "return (Object[]) result",
    sep="\n")

result <- Evaluate (groovyScript=groovyScript)

temp <- lapply(result, .jevalArray)

On Fri, Jan 15, 2016 at 1:58 PM, Simon Urbanek
<simon.urbanek at r-project.org> wrote: