Skip to content

R-devel with some Gtk

7 messages · Adam Naples, Jan de Leeuw, Simon Urbanek

#
The new version of R-devel on http://gifi.stat.ucla.edu/pub has
binaries for about 480 packages. It includes native versions
of RGtk and some of its friends (RGtkConsole, RGtkViewers,
RGtkScrollPane), which allow you to write portable GUI R
applications (with the Aqua look on OS X). The caveat is that
both RGtk and the GTK+OSX frameworks are still incomplete, so
some widgets are inevitably missing.

Observe that this version has no support for X11, uses Aqua
Tcl/Tk, and is intended to be used from either Terminal.app
or Emacs.app, and not from R.app.
===
Jan de Leeuw; Professor and Chair, UCLA Department of Statistics;
Editor: Journal of Multivariate Analysis, Journal of Statistical  
Software
US mail: 9432 Boelter Hall, 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
#
Perhaps this is a silly question for the lis, but I can't seem to get  
rpy  ( http://rpy.sourceforge.net)  fully working with this version of  
R.  some basic functions work, but little else.

When I try to import the rpy module in python I get the following error.
		
		>>> from rpy import *
		Error in dyn.load(x, as.logical(local), as.logical(now)) :
	        		unable to load shared library  
"/Library/Frameworks/R.framework/Versions/2.0.0/Resources/library/ 
stats/libs/stats.so":
		  dlcompat: dyld: python can't open library: libR.dylib  (No such  
file or directory, errno = 2)
		Error in dyn.load(x, as.logical(local), as.logical(now)) :
		        unable to load shared library  
"/Library/Frameworks/R.framework/Versions/2.0.0/Resources/library/ 
methods/libs/methods.so":
		  dlcompat: dyld: python can't open library: libR.dylib  (No such  
file or directory, errno = 2)
		In addition: Warning message:
		package stats in options("defaultPackages") was not found


but some commands still work such as
		>>> r.seq(1,10)
		[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

but if I try to do anything fancier, I get errors and if I try to load  
a library it crashes.

In the README for rpy it tells me I need to build R with the following
configure option    '--enable-R-shlib

I am not at all sure what this means, should I download the source and  
just rebuild R locally?

Any help or clarification would be fantastic.
thanks in advance
-an
On Jun 3, 2004, at 7:47 PM, Jan de Leeuw wrote:

            
#
Where and how did you get your rpy ?

-- Jan
On Jun 4, 2004, at 22:12, Adam Naples wrote:

            
===
Jan de Leeuw; Professor and Chair, UCLA Department of Statistics;
Editor: Journal of Multivariate Analysis, Journal of Statistical  
Software
US mail: 8130 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
#
I downloaded it from rpy.sourceforge.net and just did a
'python setup.py install'
I am running 10.3.4 with the installed apple python and a few extra  
modules (PyX, PyObjC, Twisted, etc)

Thanks

-an
On Jun 5, 2004, at 1:26 AM, Jan de Leeuw wrote:

            
#
Hi, I managed to get it working, although I think I may have used some  
hideous hack.
I made an alias (using the finder) to libR.dylib from the  
/library/frameworks/r.framework/ and replaced the one in /usr/local/lib
this managed to change my error messages to the following
	
			Error in dyn.load(x, as.logical(local), as.logical(now)) :
       				  unable to load shared library  
"/Library/Frameworks/R.framework/Versions/2.0.0/Resources/library/ 
stats/libs/stats.so":
				  dlcompat: dyld: python truncated or malformed library:  
/usr/local/lib/libR.dylib (file is empty)
			Error in dyn.load(x, as.logical(local), as.logical(now)) :
  			      	  unable to load shared library  
"/Library/Frameworks/R.framework/Versions/2.0.0/Resources/library/ 
methods/libs/methods.so":
				  dlcompat: dyld: python truncated or malformed library:  
/usr/local/lib/libR.dylib (file is empty)
			In addition: Warning message:
			package stats in options("defaultPackages") was not found

Then I just copied the entire libR.dylib file from the R.framework/lib  
directory to /usr/local/lib
now, it seems to work flawlessly. Although I am worried that I may have  
done something terrible.

This helped me out, maybe some other new users will find it helpful.
thanks
-an
On Jun 5, 2004, at 1:26 AM, Jan de Leeuw wrote:

            
#
On Jun 5, 2004, at 10:19 AM, Adam Naples wrote:
Easier solution should be to just append 
/Library/Frameworks/R.framework/Resources/bin to DYLIB_LIBRARY_PATH 
(see the R shell script).
Usually it's a better idea to modify the library path than to copy 
things ... but I don't have rpy here - it's just a general advice ;).

Cheers,
Simon

---
Simon Urbanek
Department of computer oriented statistics and data analysis
University of Augsburg
Universit?tsstr. 14
86135 Augsburg
Germany

Tel: +49-821-598-2236
Fax: +49-821-598-2200

Simon.Urbanek@Math.Uni-Augsburg.de
http://simon.urbanek.info
#
On Jun 5, 2004, at 11:13 AM, Simon Urbanek wrote:

            
oops, that should read DYLD_LIBRARY_PATH of course ... (see "man dyld" )

---
Simon Urbanek
Department of computer oriented statistics and data analysis
University of Augsburg
Universit?tsstr. 14
86135 Augsburg
Germany

Tel: +49-821-598-2236
Fax: +49-821-598-2200

Simon.Urbanek@Math.Uni-Augsburg.de
http://simon.urbanek.info