[R] Copying to R a rectangular array from a Java class
Hurr
hill0093 at umn.edu
Mon May 2 22:42:04 CEST 2011
I am happy to report that the author and maintainer of rJava informed me
that the 2-dim array in java needs sapply and .jevalArray as follows:
> conn2Arr <- sapply(.jfield(rJavaTst,sig="[[D","con2Arr"),.jevalArray)
> conn2ArrRet <-
> sapply(.jcall(rJavaTst,returnSig="[[D","retCon2Arr"),.jevalArray)
> # I can't identify any complaints so far
> print(conn2Arr)
[,1] [,2] [,3]
[1,] 101 201 301
[2,] 102 202 302
[3,] 103 203 303
[4,] 104 204 304
> print(conn2ArrRet)
[,1] [,2] [,3]
[1,] 101 201 301
[2,] 102 202 302
[3,] 103 203 303
[4,] 104 204 304
I know there are a few out there interested since I see I got a few views.
But, I don't know the solution to the parameter-passing problem yet.
--
View this message in context: http://r.789695.n4.nabble.com/Copying-to-R-a-rectangular-array-from-a-Java-class-tp3486167p3490919.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list