<br><br><div><span class="gmail_quote">2007/10/7, Thomas Friedrichsmeier <<a href="mailto:thomas.friedrichsmeier@ruhr-uni-bochum.de">thomas.friedrichsmeier@ruhr-uni-bochum.de</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Ilias,<br><br>On Saturday 06 October 2007, I. Soumpasis wrote:<br>> This time of my working life I am trying to do some models that they use<br>> odesolve together with simulation. The result of my work is to create big
<br>> tables (like 213 x 1000 (or more)). When I try to do this with rkward it<br>> takes ages to be done. I suspect this is because of the rkward workspace<br>> browser trying to translate the object. Is there a posibility to make a
<br>> choice in order to activate/deactiate this browser (if this is the<br>> problem). What I am trying to do is to write my script in the editor and<br>> run it. No need for the browser to show me anything. Using plain R, Rcmdr
<br>> and JGR the scripts are done in a few minutes, but in rkward I cannot wait<br>> so much time to see it ending.<br><br>generally, the workspace browser does not cause much slowdown unless dealing<br>with objects that contain many "child" objects. That said, there may well be
<br>issues when dealing with large tables. First, in order to make sure the<br>workspace browser really is the issue, please try running your code inside<br>local(). E.g.:<br>        local({<br>                x <- whatever()
<br>        })<br>If this is considerably faster than<br>        x <- whatever()<br>then in fact, the workspace browser is to blame. Otherwise, we'll need to look<br>elsewhere.</blockquote><div><br>Yeap, there is a great difference. This solves the problem and makes it as fast as it should. However i cannot use pdf() function with xyplot.
<br>Example:<br>pdf("plot.pdf")<br>xyplot(bla bla bla)<br>dev.off()<br><br>does not produces plots, although my data exists.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Regardless of the outcome, could you produce an example that shows this<br>problem?</blockquote><div><br>Here is a very silly example showing however the problem: <br><br>n=100<br>m=213<br>m1<-matrix(nrow=n*m, ncol=5)<br>
for (i in 1:n){<br>    for (j in 1:m){<br>        m1[(i-1)*m+j,1]=(i-1)*j+j<br>        m1[(i-1)*m+j,2]=i*j+1<br>        m1[(i-1)*m+j,3]=i*j+2<br>        m1[(i-1)*m+j,4]=i*j+3<br>        m1[(i-1)*m+j,5]=i*j+4<br>    }<br>}
<br>print(m1)<br><br>and with local<br><br>local({<br>n=100<br>m=213<br>m1<-matrix(nrow=n*m, ncol=5)<br>for (i in 1:n){<br>    for (j in 1:m){<br>        m1[(i-1)*m+j,1]=(i-1)*j+j<br>        m1[(i-1)*m+j,2]=i*j+1<br>        m1[(i-1)*m+j,3]=i*j+2
<br>        m1[(i-1)*m+j,4]=i*j+3<br>        m1[(i-1)*m+j,5]=i*j+4<br>    }<br>}<br>print(m1)<br>})<br><br></div>If you change n to bigger number then the problem is even bigger.<br><br>Kind Regards,<br>Ilias<br></div><br>