[R-sig-Geo] sum of point values within a grid square

2008-04-02 Thread Andrew James Hoskins
Hi all, I'm trying to get the sum of value z for all points that fall within a grid square. I've been trying to use the overlay function on a grid converted to polygons, however, it returns the sum of the coordinates and the z values, how can I have it return only the sum of z? Also, once I have

[R-sig-Geo] Colouring hatch lines

2008-04-02 Thread Mulholland, Tom
I might be having finger problems, but I have been unable to get R to overlay coloured hatching on one of my plots. This code replicates my problem which I would have thought would have given me vertical yellow lines. require(maptools) require(classInt) columbus <- readShapePoly(system.file("etc/

[R-sig-Geo] Test of independency in a contingency table for spatial variables

2008-04-02 Thread Agustin Lobo
Dear list, I've classified a set of points according to two different sets of descriptors (assume a set of descriptors is biological, the other set environmental) into N and M classes respectively, thus I have 2 vectors V1 and V2 recording each classification. I've made a contingency table conti <

[R-sig-Geo] dimensions do not match

2008-04-02 Thread mathieu grelier
A question about a problem already described in this list ( https://stat.ethz.ch/pipermail/r-sig-geo/2006-July/001160.html), but I didn't find any answer. I am trying to achieve ordinary kriging using gstat (via the autokrige package) in GRASS with a big dataset (24067 points). After the program r

Re: [R-sig-Geo] readVECT6 temporary failure

2008-04-02 Thread Roger Bivand
On Wed, 2 Apr 2008, Facundo Muñoz wrote: Hello list, i've been dealing all day with this, and i can't find the problem. It suddenly begun to happen. Im working with GRASS 6.2.3 under CygWin, and with R 6.2.2 with the latest libraries (in fact, while trying to solve this problem, i removed all

[R-sig-Geo] readVECT6 temporary failure

2008-04-02 Thread Facundo Muñoz
Hello list, i've been dealing all day with this, and i can't find the problem. It suddenly begun to happen. Im working with GRASS 6.2.3 under CygWin, and with R 6.2.2 with the latest libraries (in fact, while trying to solve this problem, i removed all R versions, and reinstalled the latest. B

Re: [R-sig-Geo] mdf files

2008-04-02 Thread Agustin Lobo
Sure, (if I manage to do it...) Agus Roger Bivand escribió: > On Wed, 2 Apr 2008, Agustin Lobo wrote: > >> Has anyone imported mdf files from IMPS4.1 >> (http://www.census.gov/ipc/www/imps/index.html) or >> know of any tool for this? >> >> I've been browsing the files, writing the R function >>

Re: [R-sig-Geo] question about regression kriging

2008-04-02 Thread ONKELINX, Thierry
Dear Vanessa, What residuals did you use? The ones in the original scale or in the logit scale? Interpolate the residuals in the logit scale and add these to the model predictions in the logit scale. And the transform those values back to the original scale. This will prevent values outside the

Re: [R-sig-Geo] Recombining polygon shapefiles using maptools

2008-04-02 Thread Roger Bivand
On Wed, 2 Apr 2008, Roger Bivand wrote: > On Thu, 27 Mar 2008, Don MacQueen wrote: > >> I have six polygon shapefiles. Two of them represent my area of >> interest (call them A and B), and the other four (call them C, D, E, >> F) represent holes in the first two. >> >> I would like to create a sin

[R-sig-Geo] question about regression kriging

2008-04-02 Thread Vanessa Stelzenmuller (Cefas)
Hello, We work on the application of regression kriging to presence / absence data in the context of species distribution modelling. In R in a first step we fit the trend surfaces with logistic regression models. Then we fit a variogram to the regression residuals and interpolate the residua

Re: [R-sig-Geo] mdf files

2008-04-02 Thread Roger Bivand
On Wed, 2 Apr 2008, Agustin Lobo wrote: > Has anyone imported mdf files from IMPS4.1 > (http://www.census.gov/ipc/www/imps/index.html) or > know of any tool for this? > > I've been browsing the files, writing the R function > does not seem too > difficult but wanted to make sure that the tool > do

[R-sig-Geo] mdf files

2008-04-02 Thread Agustin Lobo
Has anyone imported mdf files from IMPS4.1 (http://www.census.gov/ipc/www/imps/index.html) or know of any tool for this? I've been browsing the files, writing the R function does not seem too difficult but wanted to make sure that the tool does not exist yet. Thanks Agus -- Dr. Agustin Lobo In

Re: [R-sig-Geo] map projection problem

2008-04-02 Thread Roger Bivand
On Tue, 1 Apr 2008, Melanie Abecassis wrote: > Hi, > I am unsuccessfully trying to change the map projection in map function > of the maps library. > > Here is my code : > > library(maps) > library(mapdata) > library(mapproj) > > map(database = "world", fill = TRUE, col = 1, plot = TRUE,add=F, >

Re: [R-sig-Geo] Recombining polygon shapefiles using maptools

2008-04-02 Thread Roger Bivand
On Thu, 27 Mar 2008, Don MacQueen wrote: > I have six polygon shapefiles. Two of them represent my area of > interest (call them A and B), and the other four (call them C, D, E, > F) represent holes in the first two. > > I would like to create a single object that can be passed to > spsample() for