On 09/01/2011 08:34 AM, azam jaafari wrote: > Hi > > I have a problem for saving grid file in R. I want to save a grid file as > "tif".
If you want to save a picture (bitmap) of your data, use e.g. the tif() function in such a way: tiff("predict.tif") plot(predict.grid) dev.off() Below you are saving a spatial grid, not a picture. These files are meant to be opened by GIS type software (ArcGIS, QGIS, R), not by picture viewers such as paint. good luck, Paul > > I write this: writeGDAL(predict.grid, 'predict.tif') > > after running, I don't recieve any error. But when I want to open the > 'file.tif', it doesn't open. > for example in paint program: I recieve this: Paint cannot read this file. > This is not valid bitmap file, or its format is not currently supported. > > Please help me > [[alternative HTML version deleted]] > > > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Paul Hiemstra, Ph.D. Global Climate Division Royal Netherlands Meteorological Institute (KNMI) Wilhelminalaan 10 | 3732 GK | De Bilt | Kamer B 3.39 P.O. Box 201 | 3730 AE | De Bilt tel: +31 30 2206 494 http://intamap.geo.uu.nl/~paul http://nl.linkedin.com/pub/paul-hiemstra/20/30b/770 [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.