Re: [R-sig-Geo] How to subset a spatial grid?

2008-05-20 Thread Roger Bivand
ling grids. Regards Yong *From:* Edzer Pebesma [mailto:[EMAIL PROTECTED] *Sent:* Tue 20/05/2008 6:11 PM *To:* Yong Li *Cc:* r-sig-geo@stat.math.ethz.ch *Subject:* Re: [R-sig-Geo] How to subset a spatial grid? Have

Re: [R-sig-Geo] How to subset a spatial grid?

2008-05-20 Thread Edzer Pebesma
/2008 6:11 PM *To:* Yong Li *Cc:* r-sig-geo@stat.math.ethz.ch *Subject:* Re: [R-sig-Geo] How to subset a spatial grid? Have you tried Map1 <- Map[1:100,1:100] ? Note that this works differently for SpatialGridDataFrames and SpatialPixelsDataFrames; the first knows about [rows,cols,bands], the sec

Re: [R-sig-Geo] How to subset a spatial grid?

2008-05-20 Thread Yong Li
: Yong Li Cc: r-sig-geo@stat.math.ethz.ch Subject: Re: [R-sig-Geo] How to subset a spatial grid? Have you tried Map1 <- Map[1:100,1:100] ? Note that this works differently for SpatialGridDataFrames and SpatialPixelsDataFrames; the first knows about [rows,cols,bands], the second about [pix

Re: [R-sig-Geo] How to subset a spatial grid?

2008-05-20 Thread Edzer Pebesma
Have you tried Map1 <- Map[1:100,1:100] ? Note that this works differently for SpatialGridDataFrames and SpatialPixelsDataFrames; the first knows about [rows,cols,bands], the second about [pixels, bands]. -- Edzer Yong Li wrote: Dear All, I want to subset a large spatial grid (2000*2000) i

[R-sig-Geo] How to subset a spatial grid?

2008-05-20 Thread Yong Li
Dear All, I want to subset a large spatial grid (2000*2000) into many smaller grids for further processing in my simulation models. Could anyone do it before and any tips will be highly appreciated? Library(rgdal) Map <- readGDAL("yong.img") # one image from erdras imagine Map$va <- Map$band1 Ma