On 08/13/2010 03:33 PM, Patrick Giraudoux wrote:
> Thank you both, that is very clear now. SpatialPixelsDataFrame objects
> can be "indexed" as a data frame, but not SpatialGridDataFrame where
> row, col, band must be specified (thanks also not to have written,
> please read the doc, which was a
Thank you both, that is very clear now. SpatialPixelsDataFrame objects
can be "indexed" as a data frame, but not SpatialGridDataFrame where
row, col, band must be specified (thanks also not to have written,
please read the doc, which was all what I deserved..)
Actually, my question was simpli
you mean
> chinatemput...@data[idx,]
?
If you want to subset the grid itself, look at the examples for
SpatialGridDataFrame class
# the following is weird, but illustrates the concept of row/col
selection:
data(meuse.grid) # only the non-missing valued cells
fullgrid(meuse.grid) = TRUE
imag
On Fri, 13 Aug 2010, Patrick Giraudoux wrote:
Hi,
I am trying to subset a SpatialGridDataFrame object as following:
idx<-chinatemput...@data[,1]>10 # select elements of column1 whose values
are > 10
idx[is.na(idx)]<-FALSE # make a vector of class "logical" (replacing NA by
FALSE)
and thi
Hi,
I am trying to subset a SpatialGridDataFrame object as following:
idx<-chinatemput...@data[,1]>10 # select elements of column1 whose
values are > 10
idx[is.na(idx)]<-FALSE # make a vector of class "logical" (replacing NA
by FALSE)
and this gives:
ChinaTempUTM47[idx,]
Error in ChinaTem