[R-SIG-Mac] Using quartz-device from Emacs+ess

Armin Goralczyk agoralczyk at gmail.com
Thu Apr 14 15:35:14 CEST 2005


Thanks for all the help and sorry to have bothered you. Using pdf() and 
jpeg() works fine with dev.off(). I suppose I should have read the 
manual more thoroughly.

Concerning the ``Trick'' (thanks for your detailed instructions): I 
followed the instructions (see below), but behaviour of the window is 
the same (i.e., quartz window always ``inactive'', ball spinning). But 
I am not sure if I have the right version of R (R 2.0.1 came in 
installer with for R Cocoa GUI 1.01). Do I have to recompile as  
instructed? Or is the version that comes in the installer already 
compiled with Aqua Tcl/Tk? I am not an expert concerning these things!

Yet another question: Do I get different graphics if I do plots in a 
x11-device then export them via dev.copy() to the pdf-device than using 
the quartz-device (from the R Cocoa GUI) and save as file? (it says is 
the R Mac FAQ the plots are ``nicer'' with the quartz?!)

Thanks for help.
Armin



Quote from Jan de Leeuw:
Use a version of R compiled with the Aqua Tcl/Tk.

0. Use the terminal
1. go to /Library/Frameworks/R.framework/Resources/bin/exec
2. say "sudo /Developer/Tools/Rez -t APPL Carbon.r -o R"
3. in /Library/Frameworks./R.framework/Resources/etc put a file
with

local({
        options(device="quartz")
        old <- getOption("defaultPackages")
        options(defaultPackages = c(old, "tcltk"))
      })

Now you should be OK. This gives R a resource fork, and actually
makes it into a Tcl/Tk application. The Tcl/Tk event loop now takes
care of the events in the graphics window.


Gruß
Armin

--
Armin Goralczyk; Guttmannstr. 4; Appartment 2615; 76307 Karlsbad
Telefon Festnetz: +49 7202 289052; Mobil: +49 179 9162596
Electronic mail: goralczyk at mac.com
Web site: http://homepage.mac.com/goralczyk
--
Solange ich lebe, muß ich damit rechnen, daß ich weiterlebe.
Karl Valentin
--



More information about the R-SIG-Mac mailing list