inside.swin {ads} | R Documentation |
Test whether points are inside a sampling window
Description
Function inside.swin
tests whether points lie inside or outside a given sampling window.
Usage
inside.swin(x, y, w, bdry=TRUE)
Arguments
x |
a vector of |
y |
a vector of |
w |
an object of class |
bdry |
by default |
Value
A logical vector whose ith
entry is TRUE
if the corresponding point is inside w,
FALSE
otherwise.
Note
For "complex"
sampling windows, points inside the triangles to remove or on their boundary, are considered outside.
Author(s)
See Also
swin
.
Examples
data(BPoirier)
BP <- BPoirier
wr <- swin(BP$rect)
sum(inside.swin(BP$trees$x, BP$trees$y, wr))
wc <- swin(c(55,45,45))
sum(inside.swin(BP$trees$x, BP$trees$y, wc))
wrt <- swin(BP$rect, triangles=BP$tri1)
sum(inside.swin(BP$trees$x, BP$trees$y,wrt))
[Package ads version 1.5-10 Index]