Re: [R-sig-Geo] Error in writeRaster as IDRISI(rst) file

2013-12-08 Thread Ahmadou Dicko
I don't understand why this is not working. Meanwhile you can use rgdal::writeGDAL library(raster) library(rgdal) r - raster(nrow=10, ncol=10) s - stack( sapply(1:2, function(i) setValues(r, rnorm(ncell(r), i, 3) )) ) s[1:6] - NA single - s$layer.1 writeGDAL(as(single, SpatialGridDataFrame),

Re: [R-sig-Geo] Error in writeRaster as IDRISI(rst) file

2013-12-08 Thread Ahmadou Dicko
Updating the raster package from r-forge seems to fix this error. writeRaster(single, filename= idri.rst, format= IDRISI, overwrite=TRUE) ## class : RasterLayer ## dimensions : 10, 10, 100 (nrow, ncol, ncell) ## resolution : 36, 18 (x, y) ## extent : -180, 180, -90, 90 (xmin,

Re: [R-sig-Geo] Error in writeRaster as IDRISI(rst) file

2013-12-08 Thread Eddie Smith
Thanks Ahmadou. Yup, updating raster package solved the problem. On Sun, Dec 8, 2013 at 7:51 PM, Ahmadou Dicko dicko.ahma...@gmail.comwrote: Updating the raster package from r-forge seems to fix this error. writeRaster(single, filename= idri.rst, format= IDRISI, overwrite=TRUE) ## class

Re: [R-sig-Geo] another covariance matrix question

2013-12-08 Thread Edzer Pebesma
On 12/07/2013 08:18 PM, Hodgess, Erin wrote: Hi again. I have a question about covariance matrices (again) Suppose we have an exponential model with c=2 and a=3. Then for c_{ij} = c exp(-h_{ij}/a), when i=j, we should have: c_{ii} = 2 exp(0) = 2 But shouldn't c_{ii} = 1,

Re: [R-sig-Geo] Error in writeRaster as IDRISI(rst) file

2013-12-08 Thread Eddie Smith
Just a small update. I successfully wrote a *.rst file using raster package 2.1.71. However, when I read the file in IDRISI, the raster is not complete. Only half of the full raster were created. Not really sure why. Ahmadou's code works perfectly fine. writeGDAL(as(single,

Re: [R-sig-Geo] another covariance matrix question

2013-12-08 Thread Hodgess, Erin
Eeek! I can't believe it. Thanks so much! From: r-sig-geo-boun...@r-project.org [r-sig-geo-boun...@r-project.org] on behalf of Edzer Pebesma [edzer.pebe...@uni-muenster.de] Sent: Sunday, December 08, 2013 2:16 PM To: r-sig-geo@r-project.org Subject: Re: