Re: [R-sig-Geo] obtaining row indexes from a list of column indexes

2010-11-17 Thread caspar hallmann
Edzer, say m is your matrix of TRUE's and FALSE's, then: which(m,arr.ind=TRUE) will give you the column and row numbers of the matrix satisfying the conditions supplied to which. Hope it helps Caspar On Wed, Nov 17, 2010 at 8:29 PM, Edzer Pebesma wrote: > List, > > given an arbitrary n x m

Re: [R-sig-Geo] CRS: list of datum?

2010-10-11 Thread caspar hallmann
HI Agus, see A=make_EPSG() A in rgdal Caspar On Sun, Oct 10, 2010 at 10:36 PM, Agustin Lobo wrote: > HI! > > While >> CRS("+proj=utm +zone=32 +datum=WGS84") > CRS arguments: >  +proj=utm +zone=32 +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0 > > is correct, the same with ED50 is not: > >> CRS("

Re: [R-sig-Geo] Question of ppm warnings of print.ppm

2010-09-27 Thread caspar hallmann
Hi Adrian, you are right, the latest version does not behave like that. Thanks a lot Caspar On Mon, Sep 27, 2010 at 11:57 AM, Adrian Baddeley wrote: > caspar hallmann writes: > >> I am attempting to fit an inhomogeneous poisson point process to some >> point pattern da

Re: [R-sig-Geo] Heteroskedasticity and different Spatial Weigth Matrices

2010-09-24 Thread caspar hallmann
Hi Angela, an idea might be to use gls with some proper variance function (say varPower). Then take the pearson residuals for you Morans tests. my 2 cents Caspar On Fri, Sep 24, 2010 at 4:23 PM, Angela Parenti wrote: > Hey everyone, > > I'm puzzled about a recent result, and I'm wondering

[R-sig-Geo] Question of ppm warnings of print.ppm

2010-09-24 Thread caspar hallmann
Dear list, I am attempting to fit an inhomogeneous poisson point process to some point pattern data, using ppm from spatstat (v 1.17-5). I have been found guilty of having NA values in my covariate-images(a categorical variable), and have thus been receiving a lot of warnings. Having fitted my mod

Re: [R-sig-Geo] Inverting the scale in heat.colors

2010-09-12 Thread caspar hallmann
use colorampPalette(). You can define your own colors in any order. something as in : plot(1:10,1,col= colorRampPalette(c("blue", "red"))(10) hope it helps Caspar On Sun, Sep 12, 2010 at 3:05 PM, Manuel Spínola wrote: >  Dear list members, > > I am plotting the result of a kriging with spplot

Re: [R-sig-Geo] negative r-squares

2010-09-09 Thread caspar hallmann
This raises a question though whether one should use the mean of the training data or the mean of the test data in calculating the total sum of squares. I believe the first is more fair with respect to answering whether a given model is any better as compared the null model in predicting the respon

Re: [R-sig-Geo] how to do randomly sampling in raster layer

2010-08-03 Thread caspar hallmann
Dear Mao, You can use function rpoint from spatstat, after converting your raster object into a pixel image. consider the following: library(raster) library(spatstat) library(maptools) library(sp) # An arbitrary raster r <- raster(system.file("external/test.grd", package="raster")) # plot it im

[R-sig-Geo] writeOGR issue in dbf

2010-03-18 Thread caspar hallmann
Dear list, I am using writeOGR to create an ESRI shapefile from a SpatialPointsDataFrame. When opening the shapefile in ArcMap and ask for the attributes, I get an error "A column was specified that does not exist". Similarly, when opening the dbf of the shapefile in Paradox I get "Unable to open

Re: [R-sig-Geo] Bounding box for spplot?

2010-03-02 Thread caspar hallmann
On Tue, Mar 2, 2010 at 5:39 PM, Ageel Ibrahim Bushara < ageel_bush...@yahoo.com> wrote: > Try to write : box.col = "0" > in the legend. > > > Cheers, > Ageel > > --- On *Tue, 3/2/10, caspar hallmann * wrote: > > > From: caspar hallman

[R-sig-Geo] Bounding box for spplot?

2010-03-02 Thread caspar hallmann
Dear list, How would one remove the bounding box (the equivalent of 'frame.plot' in plot.default) in a spplot? Thanks in advance, Caspar ___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Re: [R-sig-Geo] R crash with readOGR

2010-02-12 Thread caspar hallmann
the function 'OGRSpatialRef' worked fine, and in conjunction with read.dbf from library 'foreign' (to get the data) I'm pretty much sorted. So thanks again! all the best, Caspar On Fri, Feb 12, 2010 at 3:47 PM, Roger Bivand wrote: > On Fri, 12 Feb 2010, caspar hallma

[R-sig-Geo] R crash with readOGR

2010-02-12 Thread caspar hallmann
Dear All, Perhaps one can help me with the obvious, however I have been trying to import a shapefile using function readOGR as in: myshp<-readOGR("mydirectorypath", "shapefilename"), and without any warning (e.g. can't allocate memory size or something trivial) R crashes en shuts down. The shapefi