[Gstat-info] Re: two rapid questions: change column name in a
slot and overlay(SpatialPixels, SpatialPoints)
edzer.pebesma at uni-muenster.de
Wed Mar 12 15:11:02 CET 2008
r-sig-geo is the more appropriate list for questions of this kind.
G. Allegri wrote:
> Solved the second questions. I didn't understood that overlay returns
> the x index values at y locations...
> The first remains.
> 2008/3/12, G. Allegri <giohappy at gmail.com>:
>> I've also tried:
>> but it doesn't help
>> 2008/3/12, G. Allegri <giohappy at gmail.com>:
>>> I've two questions more (I will stop soon!):
>> > 1 - I'm trying to change a column name of the data slot of a
>> > SpatialPixelsDataFrame
>> > I've added the column this way:
>> > slot(EceZKRIG0_3,"data")[,index]<-Sim_mean_approx[]
>> > The column added is V151 (as 151 is the actual index).
>> > I want to rename it, and I've tried:
>> > names(slot(EceZKRIG0_3,"data")[index])<-"Mean_approx"
>> > No errors are raised, but the column remain V151. What's wrong?
>> > 2 - I need to extract the values from a SpatialPixelsDataFrame (SP1)
>> > at SpatialPointsDataFrame (SP2) locations.
>> > I've simply used:
>> > overlay(EceZKRIG0_3,t0)
>> > where EceZKRIG0_3 is SP1 and t0 is SP2. It returns some numerical
>> > values that I don't know what they refer to. How can I indicate that I
>> > want to extract a certain data column from SP1 (V151, in this case)?
>> > Thanks very much, as usual.
>> > Giovanni
> Gstat-info mailing list
> Gstat-info at geo.uu.nl
More information about the Gstat-info