[R] Multiple Figure environment through Java

From: Vasundhara Akkineni <vasu.akkineni_at_gmail.com>
Date: Sat 10 Dec 2005 - 03:44:06 EST

I am trying to create a .jpg file with multiple graphs on it. I am creating this file through a java servlet which connects to R using RServe. In the code below, col is an int array which has a list of the col numbers of the data file whose data i have to use for plotting.

c=new Rconnection();

   c.voidEval("data<-read.table(\"table50.txt\",header=TRUE,sep=\"\t\")");    REXP xp=c.eval("jpeg(\"plot_2.jpg\")");



   for(int i=0;i<col.length;i++)
    for(int j=0;j<col.length;j++)

     c.eval("totnorm(data["+col[i]+"],data["+col[j]+"])");     }

 I am able to plot a 4*4 matrix of plots(16 plots), but when i try to plot for a number greater than that for col.lenght, for eg, 5*5 or 6*6....the rserve.exe just shuts itself close and i get a connection error. I tried doing this manually in R and it worked fine there. How can this be resolved?


        [[alternative HTML version deleted]]

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Dec 10 03:51:55 2005

This archive was generated by hypermail 2.1.8 : Sat 10 Dec 2005 - 04:24:04 EST