[R] lattice, trellis.device, dev.off() within a condition (seems t o be a bug)

Marc Mamin M.Mamin at intershop.de
Thu Sep 18 16:41:34 CEST 2003


Hi,

I have a strange issue under W2K;
consider these two code extracts:

1)

	if(condition a){
	trellis.device(png,filename = filename_a,...
	xyplot(...
	dev.off()	
	}

2) 

	if(condition a){
	trellis.device(png,filename = filename_a,...
	xyplot(...
	}
	dev.off()	



In 1), The png file is generated, but empty; in 2), where I've taken the
dev.off clause out of the condition block, my plot is fine

I've also tried following without success:

	if(condition a){
	trellis.device(png,filename = filename_a,...
	xyplot(...
	}
	if(condition a){
	dev.off()	
	}

Is there a way to get a list of all open devices in order to close them
outsid the condition blocks ??

Thanks for your help,

Marc Mamin




More information about the R-help mailing list