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 ChinaTempUTM47[idx, ] : (subscript) logical subscript too long However, > length(idx) [1] 13536 > nrow(chinatemput...@data) [1] 13536 So, I canot sort out what happens. Any hint welcome Patrick _______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo