[R-sig-Geo] drop layer/band from SpatialGridDataFrame
Michael Sumner
mdsumner at gmail.com
Tue Aug 10 08:28:18 CEST 2010
Do you mean "layer" as in the first column in the data.frame?
Does this do what you want? The negative index means "everything but
these indexes".
monthly.sp <- monthly.sp[,-1]
On Tue, Aug 10, 2010 at 12:40 PM, Andy Bunn <Andy.Bunn at wwu.edu> wrote:
> I have a SpatialGridDataFrame with 325 variables in the @ data slot. I want to drop the first layer. Seems simple enough. Any help? Thanks, Andy
>
>> str(monthly.sp)
> Formal class 'SpatialGridDataFrame' [package "sp"] with 6 slots
> ..@ data :'data.frame': 8060 obs. of 325 variables:
> .. ..$ values: num [1:8060] 127.5 31.9 127.5 127.5 231.1 ...
> .. ..$ values: num [1:8060] 127.5 31.9 127.5 127.5 231.1 ...
> .. and so on
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Michael Sumner
Institute for Marine and Antarctic Studies, University of Tasmania
Hobart, Australia
e-mail: mdsumner at gmail.com
More information about the R-sig-Geo
mailing list