convexhull.xy
From spatstat v1.18-4
by Adrian Baddeley
Convex Hull of Points
Computes the convex hull of a set of points in two dimensions.
Usage
convexhull.xy(x, y=NULL)
Arguments
- x
- vector of
x
coordinates of observed points, or a 2-column matrix givingx,y
coordinates, or a list with componentsx,y
giving coordinates (such as a point pattern object of class"ppp"
.) - y
- (optional) vector of
y
coordinates of observed points, ifx
is a vector.
Details
Given an observed pattern of points with coordinates
given by x
and y
, this function computes
the convex hull of the points, and returns it as a window.
Value
- A window (an object of class
"owin"
).
See Also
Examples
x <- runif(30)
y <- runif(30)
w <- convexhull.xy(x,y)
plot(owin(), main="convexhull.xy(x,y)", lty=2)
plot(w, add=TRUE)
points(x,y)
X <- rpoispp(30)
plot(X, main="convexhull.xy(X)")
plot(convexhull.xy(X), add=TRUE)
Community examples
Looks like there are no examples yet.