Hello, I have a 2D array of type double in java and I want to pass this data to R in order to compute some statistics. Can anyone help me with this ? Jose -- View this message in context: http://r.789695.n4.nabble.com/passing-a-2D-array-from-Java-to-R-tp3387933p3387933.html Sent from the R devel mailing list archive at Nabble.com.
passing a 2D array from Java to R
2 messages · jcg3441, Simon Urbanek
On Mar 18, 2011, at 1:52 PM, jcg3441 wrote:
I have a 2D array of type double in java and I want to pass this data to R in order to compute some statistics. Can anyone help me with this ?
The best place would be the appropriate mailing list of the package that use use for R/Java communication. If it's rJava then stats-rosuda-devel mailing is the list to ask. In R matrices are vectors of the length m*n so you can either create one array with the values in Java, assign it (let's say to A) and call matrix(A,m,n) or you can simply pull the array as-is to R and run something like sapply(a,.jevalArray). Cheers, Simon