## S3 method for class 'ppp':
duplicated(x, \dots, rule=c("spatstat", "deldir"))"ppp").x.duplicated for
point pattern datasets (of class "ppp", see ppp.object).Two points in a point pattern are deemed to be identical if their $x,y$ coordinates are the same, and their marks are also the same (if they carry marks). The Examples section illustrates how it is possible for a point pattern to contain a pair of identical points.
This function determines which points in x duplicate
other points that appeared earlier in the sequence. It
returns a logical vector with entries that are TRUE
for duplicated points and FALSE for unique (non-duplicated)
points.
If rule="spatstat" (the default), duplicated points are
determined by testing equality of their coordinates and marks
using ==. This is the most stringent possible test.
If rule="deldir", duplicated points are
determined using the function duplicatedxy
in the package duplicated.data.frame. Setting rule="deldir"
will ensure consistency with functions in the
ppp.object,
unique.ppp,
multiplicity.pppX <- ppp(c(1,1,0.5), c(2,2,1), window=square(3))
duplicated(X)
duplicated(X, rule="deldir")Run the code above in your browser using DataLab