Re: [R-sig-Geo] [raster] substraction between two rasterLayers: error Readbin

2011-11-09 Thread Mathieu Rajerison
Ok, thanks for the answer. It must be a problem of disk space. I'll try what you say. Best, Mathieu 2011/11/9 Robert J. Hijmans > Mathieu/Carsten, > > Carsten's suggestion is also good: > > elev<-overlay(detm@layers[[1]],detm@layers[[2]], > fun=function(a,b) {return(a-b)} ) > > although I wou

Re: [R-sig-Geo] [raster] substraction between two rasterLayers: error Readbin

2011-11-09 Thread Robert J. Hijmans
Mathieu/Carsten, Carsten's suggestion is also good: elev<-overlay(detm@layers[[1]],detm@layers[[2]], fun=function(a,b) {return(a-b)} ) although I would do: elev<-overlay(detm, fun=function(a,b) {return(b-a) } , filename="disk/with/space.tif") Robert On Wed, Nov 9, 2011 at 8:46 AM, Carsten Ne

Re: [R-sig-Geo] [raster] substraction between two rasterLayers: error Readbin

2011-11-09 Thread Robert J. Hijmans
Mathieu, The error message says that something is going wrong when writing the results to disk. This smells like bug, but it is almost certainly because there is no more disk space available in your temp folder/disk. To avoid using a temp file (used for large files only), you can use calc with a f

Re: [R-sig-Geo] [raster] substraction between two rasterLayers: error Readbin

2011-11-09 Thread Carsten Neumann
Am 09.11.2011 15:39, schrieb Mathieu Rajerison: > Hi, > > > I have a RasterStack detm composed of a dem and a dtm. > > I wanted to apply the difference between dem and dtm so as to get the > elevation. > > But I got the following message (in French): > Erreur dans result[, i]<- readBin(raster@fil

[R-sig-Geo] [raster] substraction between two rasterLayers: error Readbin

2011-11-09 Thread Mathieu Rajerison
Hi, I have a RasterStack detm composed of a dem and a dtm. I wanted to apply the difference between dem and dtm so as to get the elevation. But I got the following message (in French): Erreur dans result[, i] <- readBin(raster@file@con, what = dtype, n = ncols, : le nombre d'objets à remplacer