[Gstat-info] Re: two rapid questions: change column name in a slot and overlay(SpatialPixels, SpatialPoints)

G. Allegri giohappy at gmail.com
Wed Mar 12 14:51:27 CET 2008


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
>


More information about the Gstat-info mailing list