endpoints.psp(x, which="both")
"psp"
).
"ppp"
).
x
,
and returns these points as a point pattern object.
The argument which
determines which endpoint or endpoints
of each line segment should be returned:
which="both"
x
.
which="first"
x$ends$x0, x$ends$y0
).
which="second"
x$ends$x1, x$ends$y1
).
which="left"
which="right"
which="lower"
which="upper"
The result is a point pattern. It also has an attribute
"id"
which is an integer vector identifying
the segment which contributed each point.
psp.object
,
ppp.object
,
midpoints.psp
a <- psp(runif(10), runif(10), runif(10), runif(10), window=owin())
plot(a)
b <- endpoints.psp(a, "left")
plot(b, add=TRUE)
Run the code above in your browser using DataLab