splitcaps | R Documentation |
Extract all the points in a band (two disjoint parallel caps) that fall in a specified cap.
splitcaps(X, win=sphwin(type="sphere"), upper=TRUE, lower=TRUE, as.sp=TRUE)
X |
The point pattern. An object of class |
win |
The window that contains the point pattern, must be an object of
class |
upper,lower |
Logicals, denoting whether the output should contain the points in the upper and lower caps respectively. |
as.sp |
Optional. If |
A complement of a band is the union of two disjoint caps with parallel
bases. This code separates the points in such a window by the cap
that they are in. In this context the upper cap is the cap with base
defined by the first entry in the argument param
in the
sphwin
object that defines the window, the lower cap with base
defined by the second argument.
If upper=TRUE
and lower=FALSE
a matrix containing the
locations of the points in the upper cap (if also as.sp=FALSE
)
or an object of the same class as X
.
If upper=FALSE
and lower=TRUE
a matrix containing the
locations of the points in the lower cap (if also as.sp=FALSE
)
or an object of the same class as X
.
If upper=TRUE
and lower=TRUE
a list containing two objects,
which are those described in the two previous cases (i.e. the first object
contains the points in the upper cap, the second object contains the
points in the lower cap — as matrices (if as.sp=FALSE
), or as
objects of the same class as X
).
Tom Lawrence <email:tjlawrence@bigpond.com>
gcdist
X <- rpoispp.sphwin(lambda=10, win=sphwin("bandcomp", param=c(pi/3, 2*pi/3))) Xupper <- splitcaps(X=X, upper=TRUE, lower=FALSE) Xlower <- splitcaps(X=X, upper=FALSE, lower=TRUE) Xboth <- splitcaps(X=X, upper=TRUE, lower=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.