R 2.15.1
Lion

Colleagues

In previous versions of OS X, I might do the following:
        1.  create a PDF in R
                pdf(FILENAME)
                plot(1)
                dev.off() 
        2.  open the file using the command 
                system("open …")
        3.  create the file again (same commands as above).     
The opened file was replaced with the new version.
(This differs from Windows in which the file needed to be closed in order to 
create a new version)

As of Lion, it appears that something changed.  In some instances, the behavior 
is identical, i.e., creating the new version of the file results in the open 
version being replaced with the second version.  However, in some 
circumstances, I observe the following behavior:
        1.  the original version of the file remains open
        2.  the new version appears as a second instance of Preview
        3.  the system appears to freeze for a few seconds
        4.  Preview is frozen and requires a ForceQuit

Sample code is:
pdf("xx.pdf") ; plot(1); dev.off() ; system("open xx.pdf"); Sys.sleep(3) ; 
pdf("xx.pdf") ; plot(2); dev.off()

The code above results in the desired outcome and I can't provide a short 
reproducible example (the problem only happens with extremely large multipage 
documents).

Does anyone have any thoughts as to whether this is a problem in OS X (Preview) 
or R?  Any thoughts on how to prevent it from happening?  I suspect that this 
will be a un-solveable mystery but I thought that it was worth asking.

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

_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to