Re: [R-sig-Geo] converting 0 to NAN in SpatialGridDataFrame

2013-02-06 Thread Wesley Roberts
Hi Etienne, Just to follow up I took your advice and rewrote my cva analysis using rasters as opposed to SGDF and the approach has worked well. Your suggestions in terms of converting 0's to NA was also a winner. May thanks, Wesley On Tue, Feb 5, 2013 at 5:57 PM, Wesley Roberts wrote: > Many t

Re: [R-sig-Geo] spGRASS6 issue

2013-02-06 Thread R.S. Bhalla
Thanks Roger, That fixed it. I agree with Rainer, it is somewhat non-intuitive. By the way, I've been using GRASS from within R to process dozens of images using loops, works like a charm and saved me hours if not days of repetitive work. Thanks again and cheers, Ravi P.S. The corrected formula

[R-sig-Geo] Not able to write shp file

2013-02-06 Thread vikram ranga
Dear list, I was trying to write a shapefile within a small function (to calculate centroids to polygons) but not able to do so My code was x<-readOGR(dsn="C:/.", layer="x") get.centroids<-function(x) { x.polyset<-SpatialPolygons2PolySet(x) centroids <- calcCentroid(x.polyset, rollup=2) d.c

Re: [R-sig-Geo] spGRASS6 issue

2013-02-06 Thread R.S. Bhalla
Thanks Rodger, That fixed it. I agree with Rainer, it is somewhat non-intuitive. By the way, I've been using GRASS from within R to process dozens of images using loops, works like a charm and saved me hours if not days of repetitive work. Thanks again and cheers, Ravi P.S. The corrected formul

[R-sig-Geo] (no subject)

2013-02-06 Thread Adrian.Baddeley
Mudrak, Erika [EEOBS] writes: > Hello r-sig-geo, > I have a question regarding envelopes for the pair correlation function in > spatstat. Questions about the spatstat package should be sent to the package authors. > The envelopes near r = 0 suddenly stretch to high values. The envelopes > a

Re: [R-sig-Geo] spatial regression for binary/dichotomous depend variable

2013-02-06 Thread Andrew Finley
Hi Tanja, Also, check out the spGLM function in the spBayes package as well as functions in the geoRglm package. -Andy Quoting Juan Tomas Sayago Gomez : there is also in the package McSpatial the possibility to run spatial logit and probit models. But you should check the literature in the

Re: [R-sig-Geo] spatial regression for binary/dichotomous depend variable

2013-02-06 Thread Juan Tomas Sayago Gomez
there is also in the package McSpatial the possibility to run spatial logit and probit models. But you should check the literature in there. Juan On Wed, Feb 6, 2013 at 10:09 AM, Milan Sharma wrote: > Looks like you want autologistic regression. > Just google "autologistic modelling in R" and you

Re: [R-sig-Geo] Log-normal block krige

2013-02-06 Thread Jon Olav Skoien
Another possibility is the blockPredict function in the intamap-package (also based on gstat), which can do transGaussian kriging. Fixing lambda = 0 is equal to lognormal kriging. A new version with a couple of inconsistencies removed and a better example for lognormal kriging (1.3-18) has just

Re: [R-sig-Geo] spatial regression for binary/dichotomous depend variable

2013-02-06 Thread Milan Sharma
Looks like you want autologistic regression. Just google "autologistic modelling in R" and you will get archieves of previous sessions. Best, Mitra Devkota From: Tanja Zinßer To: r-sig-geo@r-project.org Sent: Wednesday, February 6, 2013 5:53 AM Subject: [R-si

Re: [R-sig-Geo] Compare two raster using Raster Library in code saving style

2013-02-06 Thread Julian Zeidler
Dear Gianni, Also possible is a Method that also works for very large rasters (calculation done in chunks) C<-overlay(A, B, fun=function(a,b) return(a==b)) Best Julian Am 06.02.2013 13:55, schrieb Wilfried Thuiller:

Re: [R-sig-Geo] Compare two raster using Raster Library in code saving style

2013-02-06 Thread Wilfried Thuiller
Dear Gianni, Something along these lines should directly return what you look for: C <- A == B Best Wilfried Le 6 févr. 2013 à 13:41, gianni lavaredo a écrit : > Dear Members list, > > I have two raster (A and B) with the same extent, number of rows and > columns, projection, resolution, a

[R-sig-Geo] Compare two raster using Raster Library in code saving style

2013-02-06 Thread gianni lavaredo
Dear Members list, I have two raster (A and B) with the same extent, number of rows and columns, projection, resolution, and origin. Some pixels of A have the same values of B. I wish in a code saving style compare A with B and create a new raster where the pixel value is 1 (when the statement i

Re: [R-sig-Geo] spGRASS6 issue

2013-02-06 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/02/13 12:55, Roger Bivand wrote: > On Wed, 6 Feb 2013, R.S. Bhalla wrote: > >> Dear List, I have run into trouble with the execGRASS command copied below >> and can't figure >> out what I'm doing wrong. It runs fine without the size=11 argument

Re: [R-sig-Geo] spGRASS6 issue

2013-02-06 Thread Roger Bivand
On Wed, 6 Feb 2013, R.S. Bhalla wrote: Dear List, I have run into trouble with the execGRASS command copied below and can't figure out what I'm doing wrong. It runs fine without the size=11 argument (takes the default value of 3). Can storage.mode(11) [1] "double" is.integer(11) [1] FALS

[R-sig-Geo] spatial regression for binary/dichotomous depend variable

2013-02-06 Thread Tanja Zinßer
Hey everyone, I'm new in the field of spatial autocorrelation et spatial regression. I'm searching for a method to run a spatial regression with depend binary/dichotomous variables. Does anyone know, if there is a function in R to do so? I only found the morantest for lm regression. I wanted to a

Re: [R-sig-Geo] spplot specifying printing character (pch) broken?

2013-02-06 Thread Edzer Pebesma
David, this is a bug that has now been corrected on r-forge. Thanks for reporting, On 02/02/2013 04:52 PM, d.g.rossi...@utwente.nl wrote: I believe some recent change to spplot has removed the possibility of specifying a printing character other than the default 16 (fill=T) or 1. The followin

[R-sig-Geo] spGRASS6 issue

2013-02-06 Thread R.S. Bhalla
Dear List, I have run into trouble with the execGRASS command copied below and can't figure out what I'm doing wrong. It runs fine without the size=11 argument (takes the default value of 3). Can someone please help. Thanks in advance, Ravi Command: execGRASS("r.neighbors", parameters=list(inp

Re: [R-sig-Geo] Error using SpatialPixelsDataFrame function

2013-02-06 Thread Alexandre Villers
Hi, Someone with a better knowledge of errors like this one might more helpful. But as a a first start, check the structure of of coords and dat objects ( to see whether there was a mistake while reading coords.txt and dem.txt... for example headers, or separator issues), then make sure they are o

Re: [R-sig-Geo] Error using SpatialPixelsDataFrame function

2013-02-06 Thread Edzer Pebesma
SpatialPixelsDataFrame() tries to figure out how the points you feed it with are layed out on a grid structure. Small errors, possibly from rounding (you're reading from ascii) may cause it to go slightly wrong, and not give you the grid you'd like. As you probably know the grid at which "coor

[R-sig-Geo] Error using SpatialPixelsDataFrame function

2013-02-06 Thread fsantos
Dear R-Geo users, I am trying to create a SP objects using SpatialPixelsDataFrame. Next I can see the code: > proj <- '+proj=lcc +ellps=WGS84 +lat_0=0 +lat_1=30 +lat_2=60 +lon_0=-4.75' > coords <- read.table("coords.txt") > dat<- read.table("dem.txt") > test <- SpatialPixelsDataFrame(points=c

Re: [R-sig-Geo] GWR

2013-02-06 Thread Roger Bivand
DO NOT POST HTML!!! All R lists have a plain text only policy, because plain text uses much less bandwidth than HTML, limiting the carbon footprint of our list. Servers currently pollute more than most bad industries! In addition, plain text is much less insecure, because it is not interpreted