[R] Unexpected behavior of windows() command followed by print(LATTICEPLOT)

Dennis Fisher fisher at plessthan.com
Tue Mar 22 21:14:58 CET 2011


Colleagues
	R: 2.12.2
	Windows 7 (64-bit)
I am experiencing unexpected behavior in the following situation:
	FILE1:
		windows()
		plot(1, 1,) 
	FILE2:
		windows()
		PLOT	<- code.to.create.a.lattice.object()
		print(PLOT)
		Sys.sleep(10)
	FILE3:
		PLOT	<- code.to.create.a.lattice.object()
		print(PLOT)
		Sys.sleep(10)

When I open an R session and "source()" either FILE1, FILE2, or FILE3, an R graphics window open and a graphic appears.

In contrast, I type the following at a command prompt:
	R --slave --no-save < FILE1		this opens the graphics window and displays a graphic
	R --slave --no-save < FILE2		no graphics window
	R --slave --no-save < FILE3		no graphics window

I assume that the problem relates to printing options for lattice objects.  Can someone direct me to how to solve this?

Dennis

Dennis Fisher MD
P < (The "P Less Than" Company)
Phone: 1-866-PLessThan (1-866-753-7784)
Fax: 1-866-PLessThan (1-866-753-7784)
www.PLessThan.com



More information about the R-help mailing list