Re: [R-sig-Geo] error in rasterize routine?

2012-05-13 Thread Robert J. Hijmans
Dear Adam, Thanks for reporting this bug in the current version of raster (1.9-92). You have identified a valid work-around: rasvals<-raster:::.polygonsToRaster(gSRDF, rasdef, field=gSRDF$TotPop90) or rasvals<-raster:::.polygonsToRaster(gSRDF, rasdef, field='TotPop90') The bug occurs because

[R-sig-Geo] error in rasterize routine?

2012-05-13 Thread Adam Slez
I'm using the rasterize command in the raster package to rasterize polygon data and can't seem to get the rasterize routine to recognize the field parameter. Here's a working example which illustrates the problem: #load libraries library(raster) library(spgwr) #load data data(georgia) #confirm

[R-sig-Geo] spatial autocorrelation in linear environments

2012-05-13 Thread Maximiliano Sepulveda
Hi group, I am looking for a function and exampling code to run spatial autocorrelation tests but adapted to lineal habitats. My study area is a river where I set camera traps at random locations all in the riverbank. I am using occupancy models for prsence of some mammal species but I need a way t

[R-sig-Geo] problem while creating netcdf files

2012-05-13 Thread Ana
Hi! I am creating netcdf files for climatic daily datasets for 50 years. The problem is that I end up with huge files when trying just one point, and I have 2000 more points to add. Am I doing something wrong or is it supposed to be like this? The code I am using: # Make a few dimensions we can

Re: [R-sig-Geo] Antw: Re: Antw: Error when using rowSums along with a RasterStack object

2012-05-13 Thread Robert J. Hijmans
sum should be faster than calc(x, sum) because sum uses rowSums whereas calc, in this case, would call apply(values(x), 1, sum). calc(x, function(i) rowSums(i)) should be equivalent to sum (in speed and results). Whether making a RasterBrick is worth it depends on how many times you will use these

[R-sig-Geo] Antw: Re: Antw: Error when using rowSums along with a RasterStack object

2012-05-13 Thread Matteo Mattiuzzi
Dear Thiago, I don't know what makes sum() more suitable comparing to calc() but I think a fakt that you are useing a stack (and not a brick) influences also the speed of processing: ## library(raster) r <- raster() r[] <- 1:ncell(r) setOptions(todisk=TRUE) system.time(st <

Re: [R-sig-Geo] How to move legend of rhohat (spatstat)?

2012-05-13 Thread Yury Ryabov
Thank you! Yury Ryabov 2012/5/13 Rolf Turner > On 13/05/12 20:07, Yury Ryabov wrote: > >> Hi, >> >> A "rhohat" function (in "spatstat" package) has its own built-in legend >> that appears at the top left corner of the graph. Seems that it is not >> affected by "par(legend())" or I don't have

Re: [R-sig-Geo] How to move legend of rhohat (spatstat)?

2012-05-13 Thread Rolf Turner
On 13/05/12 20:07, Yury Ryabov wrote: Hi, A "rhohat" function (in "spatstat" package) has its own built-in legend that appears at the top left corner of the graph. Seems that it is not affected by "par(legend())" or I don't have a clue how to write the corresponding statement. Help on "rhohat" d

[R-sig-Geo] How to move legend of rhohat (spatstat)?

2012-05-13 Thread Yury Ryabov
Hi, A "rhohat" function (in "spatstat" package) has its own built-in legend that appears at the top left corner of the graph. Seems that it is not affected by "par(legend())" or I don't have a clue how to write the corresponding statement. Help on "rhohat" does not provide informations about optio