[R-sig-Geo] Some issues when ploting rasters...

2012-12-12 Thread Josep M Serra diaz
Dear all, I have been playing with rasters for a while but when it comes to plotting I always encounter some difficulties that I have not resolved yet... * I have a raster r2 e class : Extent xmin: -2356170 xmax: -1624740 ymin: 1218210 ymax: 2538240 r2 =

[R-sig-Geo] Modify lagsarlm function in spdep package

2012-12-12 Thread Lei Wang
Dear subscribers and Prof. Bivand, I am using lagsarlm function in spdep package to study my research problem. I am trying to use restaurants' price, rating, and some other variables to explain their customer visit. So customer visit is my dependent variable, and I have 6 independent variables. I

[R-sig-Geo] Raster memory problem

2012-12-12 Thread Marie Auger-Methe
Dear list, I am using large raster bricks for my analyses and I am running out of memory. I get the following message: Error: cannot allocate vector of size 231.0 Mb and this whether I do all my brick manipulations by loading the brick in R's memory or not (i.e., whether I use the option

Re: [R-sig-Geo] Modify lagsarlm function in spdep package

2012-12-12 Thread Roger Bivand
On Wed, 12 Dec 2012, Lei Wang wrote: Dear subscribers and Prof. Bivand, I am using lagsarlm function in spdep package to study my research problem. I am trying to use restaurants' price, rating, and some other variables to explain their customer visit. So customer visit is my dependent

Re: [R-sig-Geo] Raster memory problem

2012-12-12 Thread Raffaele Morelli
2012/12/12 Marie Auger-Methe marie.augerme...@gmail.com Dear list, I am using large raster bricks for my analyses and I am running out of memory. I get the following message: Error: cannot allocate vector of size 231.0 Mb and this whether I do all my brick manipulations by loading the

Re: [R-sig-Geo] Raster memory problem

2012-12-12 Thread Jacob van Etten
Take a look at setOptions to force disk to disk. raster will guess if it can do the operation in memory but occasionally underestimates the memory available or required. Sent from my iPhone On 12/12/2012, at 15:20, Raffaele Morelli raffaele.more...@gmail.com wrote: 2012/12/12 Marie

Re: [R-sig-Geo] Raster memory problem

2012-12-12 Thread Robert J. Hijmans
Marie, It seems you are manipulating large amounts of data in RAM with 32-bit R --- use 64 bit if you can. As Jacob indicated, you can use options like rasterOptions(maxmemory=1e+07, chunksize=1e+06). However, you might also have been able to avoid memory problems by using the more direct b1 -

[R-sig-Geo] rasterize func: polygon values to raster cells - error msg

2012-12-12 Thread Gustaf Granath
Hi, I have used the rasterize function to get values from a spatialPolyDataFrame variable (@data$variable) to raster: rasterize(SPDFobj, rasterObj, field=variable) For a specific case a get a, to me, strange error message . Error in writeValues(out, fun(n), tr$row[i]) : error in evaluating