Dear all,

Package raster changed the default datatype to FLT8S (from FLT4S) since version 2.1-37.  

This has a weird effect on Mac OS X (10.6.8): the result of writeRaster(x, 'file.tif') has dimensions 0 x 0.  The actual file is OK in size, but Mac gets confused about the dimensions and cannot read it. It works fine with  FLT4S.

I would like to change this option permanently, but if I use the .Rprofile to set rasterOptions(), then R can not plot raster anymore, it gives the error "Error in as.double(y) :    cannot coerce type 'S4' to vector of type 'double'"

This last problem was already evident in 2009 (https://stat.ethz.ch/pipermail/r-sig-geo/2009-April/005447.html), apparently the search order affects plot().  The results of search() are different if require(raster) is in .Rprofile or if it is given in the command line.  However I have not found a solution to this.

The only way to change rasterOptions() permanently that I have found is modifying the source file rasterOptions.R and rebuilding the package, but this is far from an ideal solution.

I wonder if any of you have found a solution to any of these issues.

Many thanks,

-- 
Javier G. Corripio
url: http://www.meteoexploration.com





	[[alternative HTML version deleted]]

