Jorge,

you can do:

library(raster)
m <- matrix(1:100, nr=10)
r <- raster(m, xmn=167620, xmx=171745, ymn=443660, ymx=448110)
s <- as(r, 'SpatialGridDataFrame')

Robert



On Tue, Mar 13, 2012 at 4:41 AM, jjcabrera20 <jjcabrera20@yahoo.com.mx>wrote:

> Found this, but still I need to convert this into a SpatialGridDataFrame.
> *NewRaster<-raster(Matrix, xmn=167620, xmx=171745, ymn=443660, ymx=448110,
> crs=OriginalSpatialGridDataFrame@proj4string)*
>
> --
> View this message in context:
> http://r-sig-geo.2731867.n2.nabble.com/Convert-a-Matrix-into-a-SpatialGridDataFrame-tp7368054p7368191.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]

