[R-sig-Geo] polygon neighbor matrix

2015-08-31 Thread Paul Lantos
Hi, I'm trying to use the cluster analysis program Flexscan, which I gather is similar to Satscan but it computes irregular clusters. This program requires a polygon adjacency matrix (termed a 'matrix definition file'). The example they provide has a row for every polygon, and for each row

Re: [R-sig-Geo] polygon neighbor matrix

2015-08-31 Thread Thierry Onkelinx
Maybe gTouches() from the rgeos package. ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Kliniekstraat 25 1070 Anderlecht Belgium To call in the statistician after the

Re: [R-sig-Geo] polygon neighbor matrix

2015-08-31 Thread Roger Bivand
On Mon, 31 Aug 2015, Paul Lantos wrote: Hi, I'm trying to use the cluster analysis program Flexscan, which I gather is similar to Satscan but it computes irregular clusters. This program requires a polygon adjacency matrix (termed a 'matrix definition file'). The example they provide has a

Re: [R-sig-Geo] polygon neighbor matrix

2015-08-31 Thread boB Rudis
I second the `gTouches` suggestion. There's a ref here: http://stackoverflow.com/a/26499134/1457051 but the gist of it is (this user needed adjacent polygons in ghana): library(rgeos) library(rgdal) # using http://data.biogeo.ucdavis.edu/data/diva/adm/GHA_adm.zip ghana <- readOGR("GHA_adm",

Re: [R-sig-Geo] polygon neighbor matrix

2015-08-31 Thread Roger Bivand
On Mon, 31 Aug 2015, boB Rudis wrote: I second the `gTouches` suggestion. There's a ref here: http://stackoverflow.com/a/26499134/1457051 but the gist of it is (this user needed adjacent polygons in ghana): If this answered the question, it would be OK. But it doesn't, as reading the link

Re: [R-sig-Geo] black and white textures for reclassed map in R

2015-08-31 Thread Roger Bivand
On Mon, 31 Aug 2015, Seyed Jalil Alavi via R-sig-Geo wrote: Dear all I am going to map the forest productivity using geostatistical methodsĀ  like kriging, IDW, etc in R. I would like to publish the reclassed maps as black and white with different textures in R. I do not know how to do

Re: [R-sig-Geo] Nagelkerke value for OLS model

2015-08-31 Thread Roger Bivand
On Mon, 31 Aug 2015, Seyed Jalil Alavi via R-sig-Geo wrote: Dear all, I would like to compare the performance of linear regression model with SAR models. One of the measures that I want to use is R squared. Prof. Roger Bivand mentioned in r-sig-geo that "There is no direct equivalent to the

Re: [R-sig-Geo] How to use coKriging with LANDSAT ETM Imagery

2015-08-31 Thread Edzer Pebesma
Please find a working script below. The error message was given because the variable "value" was not present in new.data; the variable was called "Sample1_Band3". It is quite unclear what you try to do: interpolating an image at the image pixels themselves (which will, by definition, return the

[R-sig-Geo] Any R package for focal statistics (moving window) within a 3D neighborhood

2015-08-31 Thread Jose Tanago
I am trying to find any R package that can provide me any build-on function for computing a 3D neighborhood filter or statistics,... (if that already exists!), or if not, at least any function from a non-spatial R-package that could be useful to build my function. Any info about preexisting R

[R-sig-Geo] How to plot multiple variogram with different title in loop?

2015-08-31 Thread Uzzal
I have a csv file contains hourly PM10 concentration of 1 march to 7 march. Please, download from here. I have already plotted all the hourly variogram (total 161) in a loop by automap package. Here is the coad, this code work properly library(sp) library(gstat) library(rgdal)