[Gstat-info] Re: two rapid questions: change column name in a
slot and overlay(SpatialPixels, SpatialPoints)
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Wed Mar 12 15:11:02 CET 2008
Dear Giovanni,
r-sig-geo is the more appropriate list for questions of this kind.
--
Edzer
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:
>>
>> overlay(EceZKRIG0_3[,"V151"],t0)
>>
>> 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[[2]]
>> >
>> > 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
> http://mailman.geo.uu.nl/mailman/listinfo/gstat-info
>
More information about the Gstat-info
mailing list