That is very helpful--Thank you, Marcelino.

After trying Marcelino's example with my own data and taking a look at the
spatstat docs, I see that the tess function can also accept a "window"
parameter of type owin.  I thought that by using the window parameter, the
outcome would be similar to the tessellation generated by the quadrat
function in spatstat where the grid does not extend past the actual
window--that is, where the tiles fit perfectly in the observation window.
 However, I was still required to specify xgrid and ygrid parameters when
using window.  This leads me to two questions:

1) Is it possible to use the function quadrat to bin a ppp AND still be
able to access the points and their attributes in each tile (similar to
what Marcelino demonstrated for tess in his response)?

2) Alternatively, using the tess function, is it possible to achieve a
tessellation similar to quadrat where the grid fits perfectly within the
observation window?

Looking forward to hearing your feedback,
LS



On Sun, Jun 30, 2013 at 4:07 PM, Marcelino de la Cruz <
marcelino.delacruz@upm.es> wrote:

> Hi LS,
> you can us function tess to create a tesselation and then split your ppp
> with it. See this example:
>
> data(lansing)
> lansing
> gridA<- tess(xgrid=seq(0,1, by=0.1), ygrid=seq(0,1,by=0.1))
> gridA
> plot(lansing)
> plot(gridA, add=T)
> lansing.g=split(lansing, gridA)
> lansing.g
> length(lansing.g)
>
> lansing.g[[1]]
> lansing.g[[1]]$n
>
> Kest(lansing.g[[1]])
> Kest(lansing.g[[2]])
> ...
> Kest(lansing.g[[100]])
>
>
>
> HTH,
>
> Marcelino
>
> El 30/06/2013 19:43, L S escribió:
>
>> Hi,
>>
>> I am not very savvy with spatial data analysis (though I am doing my best
>> to learn).  I have embarked on a spatial analysis project and am not sure
>> whether what I would like to do is possible.
>>
>> My dataset is over 500,000 points (with lat, long attributes as well as a
>> single numerical attribute).  The data was not collected in a spatially
>> regular or predictable way--the points are all over the place, with some
>> areas having greater concentration of points.
>>
>> I created a point process object with my data, using a shape file as the
>> observation window (owin).  I have been trying, with no success, to divide
>> this owin into a regular grid.  For example, could I create 0.5 x 0.5
>> degree (or in any other measurement) gridded squares over the owin and
>> then
>> access the points in each square?  The purpose is to be able to analyze
>> the
>> points in each grid independently and to be able to visualize the data
>> using the grids (such plotting the mean of points within the grid cell
>> instead of each individual point).
>>
>> The most promising r function I have found thus far is the quadrantcount
>> function in spatstat where the owin is divided into grid cells and the
>> number of points in each cell is counted.  However, I am unable to access
>> the points in each cell created by quadrantcount--is this possible at all?
>>   For example, one cell may have 2000 points...can I then put those points
>> in a data frame and do data analysis on just those?  Or, alternatively, to
>> use those cells for plotting the mean value of the points?
>>
>> Any advice would be greatly appreciated.  I look forward to hearing your
>> feedback and guidance.
>>
>> Thanks,
>> LS
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________**_________________
>> R-sig-Geo mailing list
>> R-sig-Geo@r-project.org
>> https://stat.ethz.ch/mailman/**listinfo/r-sig-geo<https://stat.ethz.ch/mailman/listinfo/r-sig-geo>
>>
>>
>

	[[alternative HTML version deleted]]

