multiplicity.ppp(x)
"ppp"
).x
. For each point in x
, this function counts how many
points are identical to it, and returns the vector of counts.
ppp.object
,
duplicated.ppp
,
unique.ppp
X <- ppp(c(1,1,0.5), c(2,2,1), window=square(3))
m <- multiplicity.ppp(X)
# unique points in X, marked by multiplicity
first <- !duplicated(X)
Y <- X[first] %mark% m[first]
Run the code above in your browser using DataLab