Thanks friend you saved a life, I will take a look on this and If I have further questions I will refer to you Jorge -- View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Looping-though-pixels-in-a-SpatialGridDataFrame-tp7113586p7368151.html Sent from the R-sig-geo mailing list archive at Nabble.com.