Not sure about this one but it seems like you have isolated the problem to
the rpy library itself --- perhaps there is some problem with DLLs since
this is an external package?
-----Original Message-----
From: xianfeng song [mailto:[EMAIL PROTECTED]
Sent: Monday, September 25, 2006 9:39 AM
To: rpy-list@lists.sourceforge.net
Subject: [Rpy] r['CRS']("+init=epsg:4214") returns NULL obj!
Dear All,
I tried 'Python-RPy' to call functions of 'sp'/'rgdal' packages, and
failed at initialize the 'CRS' object. It always returned a NULL obj.
However I get successful at 'GNU R' console.
I spent one day more, but could not move ahead a little. I put
everything as follows, any help from you?
Sincerely yours,
Song
P.S.
xxxxxxxxx Python console xxxxxxxxxxxx NULL wrong! at the end
[EMAIL PROTECTED] tmp]$ python
Python 2.4.2 (#1, Jan 23 2006, 16:08:05)
[GCC 3.4.3 (Mandrakelinux 10.2 3.4.3-7mdk)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from rpy import *
RHOME= /usr/local/gnur/lib/R
RVERSION= 2.3.1
RVER= 2031
RUSER= /home/song
Loading Rpy version 2031 .. Done.
Creating the R object 'r' .. Done
>>> r.library("sp")
['sp', 'methods', 'stats', 'graphics', 'grDevices', 'utils', 'datasets',
'base']
>>> r.library("rgdal")
Geospatial Data Abstraction Library extensions to R successfully loaded
['rgdal', 'sp', 'methods', 'stats', 'graphics', 'grDevices', 'utils',
'datasets', 'base']
>>> myobj=r['CRS'](projargs="+init=epsg:4214")
>>> r.print_(myobj)
NULL
cccccccccccccc R console ccccccccccccccc correct result!
$R
R : Copyright 2006, The R Foundation for Statistical Computing
Version 2.3.1 (2006-06-01)
> library(sp)
> library(rgdal)
Geospatial Data Abstraction Library extensions to R successfully loaded
> CRS("+init=epsg:4214")
CRS arguments: +init=epsg:4214
>
-------------------
The Package Version in my linux:
RPy-1.0RC
R-2.3.1
Python-2.4.2
[GCC 3.4.3 (Mandrakelinux 10.2 3.4.3-7mdk)] on linux2
sp_0.8-20.tar.gz
rgdal_0.4-12.tar.gz
spGDAL_0.1-1.tar.gz
-----------------------------------
The Rpy Source Code I tested:
from rpy import *
r.library("sp")
r.library("rgdal")
r['CRS'](projargs="+init=epsg:4214")
r.CRS(projargs="+init=epsg:4214")
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list