Hi all,
starting to play with RPy, (and not very familiar with R, in fact), I want to 
use gstat to make ordinary kriging, because scipy seems to not have a kriging 
module. Then, I try to follow this example
http://casoilresource.lawr.ucdavis.edu/drupal/node/442
with own datas, but at the beginning I've got an problem : how to assign
########################################

from rpy import *
RHOME= /usr/lib/R
RVERSION= 2.5.1
RVER= 2051
RUSER= /home/lionel
Loading Rpy version 2051 .. Done.
Creating the R object 'r' ..  Done

r.library("gstat")
Le chargement a nécessité le package : sp
['gstat',
 'sp',
 'stats',
 'graphics',
 'grDevices',
 'utils',
 'datasets',
 'methods',
 'base']

type(x), x.shape
(<type 'numpy.ndarray'>, (513,))

type(y), y.shape
 (<type 'numpy.ndarray'>, (513,))

type(conc), conc.shape
(<type 'numpy.ndarray'>, (513,))

set_default_mode(NO_CONVERSION)
d=r.data_frame(x=x, y=y, conc=conc)
c=r.c('x','y')
cc=r.assign("coordinates(d)", c)
r.bubble(cc, zcol='conc')
---------------------------------------------------------------------------
<class 'rpy.RException'>                  Traceback (most recent call last)
<class 'rpy.RException'>: Error in as(obj, "SpatialPointsDataFrame") :
        no method or default for coercing "character" 
to "SpatialPointsDataFrame"
#####################################
I know that cc=r.assign("coordinates(d)", c) is false, but I don't find a way 
to assign columns names : r.coordinates(d)=c is also wrong.
It's certainly a stupid question, but how do you do that?
thanks

-- 
Lionel Roubeyrie - [EMAIL PROTECTED]
Chargé d'études et de maintenance
LIMAIR - la Surveillance de l'Air en Limousin
http://www.limair.asso.fr


-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to