Re: [Rd] passing a 2D array from Java to R

From: Simon Urbanek <>
Date: Fri, 18 Mar 2011 15:48:06 -0400

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).

Simon mailing list Received on Fri 18 Mar 2011 - 19:50:49 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 18 Mar 2011 - 21:30:34 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive