[R-sig-Geo] change a column name of the data slot

G. Allegri giohappy at gmail.com
Wed Mar 12 17:37:45 CET 2008


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?

Giovanni




More information about the R-sig-Geo mailing list