[R-sig-Geo] identify for SpatialGridDataFrame objects?

Marcelino de la Cruz marcelino.delacruz at upm.es
Thu Oct 25 11:05:43 CEST 2007


Agus:

I don't konw the structure of  "delme.cl.im", but with the 
SpatialGridDataFrame example of meuse:

data(meuse.grid) # only the non-missing valued cells
coordinates(meuse.grid) = c("x", "y") # promote to SpatialPointsDataFrame
gridded(meuse.grid) <- TRUE # promote to SpatialPixelsDataFrame
x = as(meuse.grid, "SpatialGridDataFrame") # creates the full grid
x[["idist"]] = 1 - x[["dist"]] # assigns new attribute
image(x["idist"]) # note the single [ for attribute selection


identify(coordinates(x), labels=x$idist)
works fine.

Hope this helps,


Marcelino



At 10:39 25/10/2007, Agustin Lobo wrote:
>Is it possible to display a SpatialGridDataFrame object
>and use identify() to check values? I've tried after displaying
>with image() and always get
>warning: no point with 0.25 inches
>
>This is what I do:
>image(delme.cl.im, col = bpy.colors(n=10))
>
>identify(delme.cl.im at data$band1)
>
>If I use
>identify(delme.cl.im)
>I get:
>Error in as.double(y) : cannot coerce to vector
>
>
>Thanks!
>
>Agus
>--
>Dr. Agustin Lobo
>Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
>LLuis Sole Sabaris s/n
>08028 Barcelona
>Spain
>Tel. 34 934095410
>Fax. 34 934110012
>email: Agustin.Lobo at ija.csic.es
>http://www.ija.csic.es/gt/obster
>
>_______________________________________________
>R-sig-Geo mailing list
>R-sig-Geo at stat.math.ethz.ch
>https://stat.ethz.ch/mailman/listinfo/r-sig-geo


***************************************
Marcelino de la Cruz Rot
Depto. Biologia Vegetal
ETS Ingenieros Agronomos
Universidad Politecnica de Madrid
28040-Madrid
SPAIN




More information about the R-sig-Geo mailing list