Re: [R] R console closes on its own

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Tue, 04 Mar 2008 12:32:16 -0500

On 3/4/2008 12:21 PM, Duncan Murdoch wrote:

> On 2/20/2008 7:44 PM, Judith Flores wrote:

>> Dear R-experts,
>>
>> I am running a script that has the following
>> structure:
>>
>> windows(height=5.5,width=8)
>>
>> dat<-read.csv("myfile.csv")
>> names(dat)<-c('a','b','c','d')
>> dat<-dat[,1:4]
>>
>> xyplot(dat$a~dat$b)
>>
>>
>> Then I usually save the plot as a PDF (from the
>> menu in the R console). I can save the PDF twice in a
>> row; but at the third time, right when I am about to
>> give a name to the graph, R crashes, no error
>> messages.
>>
>> I am using R 2.6.2, for Windows. I copy the script
>> from TinnR.
> 
> I can reproduce a crash using the following code:
> 
> for (i in 1:100) {
> windows()
> plot(1:100)
> }
> 
> When R opens too many graphics windows, it is running out of memory, but 
> not failing gracefully.  It should be easy to fix.
> 
> The workaround in the short term is not to accumulate open graphics 
> windows; close them when you're done.  This code runs without error:
> 
> for (i in 1:100) {
> windows()
> plot(1:100)
> dev.off()
> }

I think this has already been fixed in R-patched and R-devel.

Duncan Murdoch



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 04 Mar 2008 - 17:33:59 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 Tue 04 Mar 2008 - 18:30:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive