Re: [R-sig-Geo] convert point data to count data

2009-06-12 Thread Adrian.Baddeley
Sorry, that should have been df <- data.frame(x=as.vector(rasterx.im(Z)), y=as.vector(rastery.im(Z)), count=as.vector(as.matrix(Z))) Adrian ___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https:/

[R-sig-Geo] convert point data to count data

2009-06-12 Thread Adrian.Baddeley
Karla Falk writes: > I have a data set of points that I would like to convert to grid cell counts. > Ultimately I would like to end up with a table that has an x-y coordinate for > each grid cell, > and the count of the # of points falling in each grid cell. Does anyone know > a way to do thi

Re: [R-sig-Geo] convert point data to count data

2009-06-10 Thread Roger Bivand
On Wed, 10 Jun 2009, Karla Falk wrote: Hi, I have a data set of points that I would like to convert to grid cell counts. Ultimately I would like to end up with a table that has an x-y coordinate for each grid cell, and the count of the # of points falling in each grid cell. Does anyone

Re: [R-sig-Geo] convert point data to count data

2009-06-10 Thread Mathieu Basille
Hi Karla, Appart from spatstat/sp, you might give a try to adehabitat: there's a function called 'ascgen' which does exactly what you want: create a grid of a given resolution according to the points you have, with the number of points in each cell. Check ?ascgen (and especially the example) f

[R-sig-Geo] convert point data to count data

2009-06-10 Thread Karla Falk
Hi, I have a data set of points that I would like to convert to grid cell counts. Ultimately I would like to end up with a table that has an x-y coordinate for each grid cell, and the count of the # of points falling in each grid cell. Does anyone know a way to do this in R? I have been p