Skip to content

Cocoa GUI feature request (with patch!)

7 messages · Tamas K Papp, stefano iacus, Jan de Leeuw +1 more

#
On Thu, Oct 21, 2004 at 11:33:10PM +0200, stefano iacus wrote:
What is this trick?  Can I find a description somewhere?  Do I need to
recompile?

Thanks,

Tamas
#
It should be

cd /Library/Frameword/R-framework/Resources/bin/exec
sudo /Developer/Tools/Rez   -t APPL Carbon.r -o R

you need developer tools installed and R.framework 2.0.0

I didn't test my self on 2.0.0, let me know
stefano
On Oct 22, 2004, at 12:21 AM, Tamas K Papp wrote:

            
#
The trick:

cd /Library/Frameworks/R.framework/Resources/bin/exec
sudo /Developer/Tools/Rez -t  APPL Carbon.r -o R

This only works if R is compiled with

  configure  
--with-tcl-config=/Library/Frameworks/Tcl.framework/tclConfig.sh  
--with-tk-config=/Library/Frameworks/Tk.framework/tkConfig.sh  
--enable-R-shlib --with-aqua --with-blas='-framework vecLib'  
--with-lapack TCLTK_LIBS='-framework Tcl -framework Tk'  
TCLTK_CPPFLAGS='-I/Library/Frameworks/Tcl.Framework/Headers  
-I/Library/Frameworks/Tk.Framework/Headers'

i.e. with the Aqua version of Tcl/Tk, because that's where R gets the  
Apple CF event loop
from. In addition, you get Aqua look and feel  for your tcltk library.

The trick is worthwhile if you run R from Emacs (either CLI or X11 or  
Carbon)
or from a Terminal window AND if you hate the look of X11 windows  
befouling
your Mac. I thought I was the only person in that intersection.
On Oct 21, 2004, at 3:21 PM, Tamas K Papp wrote:

            
===
Jan de Leeuw; Distinguished Professor and Chair, UCLA Department of  
Statistics;
Editor: Journal of Multivariate Analysis, Journal of Statistical  
Software
US mail: 8125 Math Sciences Bldg, Box 951554, Los Angeles, CA 90095-1554
phone (310)-825-9550;  fax (310)-206-5658;  email: deleeuw@stat.ucla.edu
homepage: http://gifi.stat.ucla.edu
   
------------------------------------------------------------------------ 
-------------------------
           No matter where you go, there you are. --- Buckaroo Banzai
                    http://gifi.stat.ucla.edu/sounds/nomatter.au
1 day later
#
Hi All,

I write to register my support for making Emacs and R and OS X live and
play together gracefully. I can't imagine not using Emacs for Sweave
files, LaTeX, and R (via ESS) in general. But, having X11 running is
annoying, to me, too. So, neither Jan nor Tamas are the only folks in this
boat.

I also write to praise the new R GUI as something very beautiful that will
help my non-Emacs savvy students have much much better experiences with R.

And to thank Stefano, Simon, and Jan and the many others who have done
such great work on R for OS X!

Best,

Jake

Jake Bowers
Assistant Professor of Political Science
Faculty Associate in the Center for Political Studies, ISR
University of Michigan
http://www.umich.edu/~jwbowers
On Thu, 21 Oct 2004, Jan de Leeuw wrote:
#
I tried it, nothing changes.

I am not sure that my R has been compliled with the options given
below.  How can I check that?

I am using R-2.0.0-Batteries-Included.dmg, 10-15-04.  It is compiled
with Tcl and Tk and the other options?  My /Library/Frameworks has
only PrintMeSSL.framework, R.framework, StuffIt.framework, should I
need anything else there?

BTW, R-2.0.0-Batteries-Included is simply amazing.  Besides R, the
Emacs is the most consistent one I have seen on OS X.  Thank you very
much!

Thanks,

Tamas
On Thu, Oct 21, 2004 at 04:46:53PM -0700, Jan de Leeuw wrote:

            
#
At

http://gifi.stat.ucla.edu/pub/Hack.dmg

you'll find a package which you can install over (after)  
Batteries-Included
It contains Tcl.framework, Tk.framework, and an alternative version
of R.framework compiled with Tcl/Tk flags set to the Aqua version.

This is for people who a) want to use R from Emacs or Terminal, b)
do not want to use X11, c) do want to use the Quartz device, d)
do not insist on using the Cocoa GUI.

After you start R you have to do library(tcltk). This will open the
R application in your dock (with a generic icon). If that works you
will have a Quartz device you can interact with, and you can
try everything with demo(tkdensity).

Your tcltk will not work anymore with the Cocoa R.app or with JGR
after this, however. You cannot live in both worlds.
On Oct 24, 2004, at 7:02 AM, Tamas K Papp wrote:

            
===
Jan de Leeuw; Distinguished Professor and Chair, UCLA Department of  
Statistics;
Editor: Journal of Multivariate Analysis, Journal of Statistical  
Software
US mail: 8125 Math Sciences Bldg, Box 951554, Los Angeles, CA 90095-1554
phone (310)-825-9550;  fax (310)-206-5658;  email: deleeuw@stat.ucla.edu
homepage: http://gifi.stat.ucla.edu
   
------------------------------------------------------------------------ 
-------------------------
           No matter where you go, there you are. --- Buckaroo Banzai
                    http://gifi.stat.ucla.edu/sounds/nomatter.au
#
Thank you very much, this is really nice!

A minor glitch: if I don't open a quartz() window explicitly,

library(tcltk)
plot(1:5,1:5)

makes R segfault.  Do you experience this?

If I plot first, and plots appear in an x11() window, everything runs
smooth.  It also works if I open a quartz() window.

I installed batteries-included, did a

/Developer/Tools/Rez -t  APPL Carbon.r -o R  

(this was on Friday), then installed the Hack.dmg on this.  Should I
reinstall everyhing from scratch?

Thanks

Tamas
On Sun, Oct 24, 2004 at 08:43:00AM -0700, Jan de Leeuw wrote: