[R-sig-Geo] read ascii problem floating point
Robert Hijmans
r.hijmans at gmail.com
Fri Jan 21 17:54:47 CET 2011
> I have tried to read an ascii file using “readAsciiGrid” {maptools} in R
> 2.12.0. The z values are incorrect, and I strongly suppose that the
> problem is due to floating point.
Clémentine
If would helpful if you said what is incorrect about the z values. You could
try this alternative route:
library(raster)
r = raster('filename.asc')
plot(r)
# if you want an sp object:
x = as(r, 'SpatialGridDataFrame')
Robert
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/read-ascii-problem-floating-point-tp5948435p5948458.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list