require(spatstat)
data(cells)
K <- Kest(cells)
# discard the estimates of K(r) for r > 0.1
Ksub <- K[K$r <= 0.1, ]
# discard the border method estimator
Ksub <- K[ , names(K) != "border"]
Run the code above in your browser using DataCamp Workspace