[R-sig-Geo] making sequential subsets of a ppp object, based on value of a mark

Christopher W. Ryan cry@n @end|ng |rom b|ngh@mton@edu
Thu Jan 7 03:20:49 CET 2021


I have a marked ppp object, about 5300 points. One of the marks is
called period and has values 1:13.  What is an efficient way to make 13
period-specific subset point patterns?  All I've been able to come up
with, embarrasingly, is 13 lines like the following:

per1.ppp <-  subset(analytical.ppp, subset = (period == 1))
pre2.ppp <-  subset(analytical.ppp, subset = (period == 2))
per3.ppp <-  subset(analytical.ppp, subset = (period == 3))
and so on.

I'm sure there is a better way.

Thanks.

--Chris Ryan



More information about the R-sig-Geo mailing list