Description Usage Arguments Value Examples
Do something with Points.within
1 2 | points.within(x, fs, fe, return.list = F, return.unique = F,
sorted = F, return.point.counts = F, ...)
|
x |
Parameter |
fs |
Parameter |
fe |
Parameter |
return.list |
Parameter |
return.unique |
Parameter |
sorted |
Parameter |
return.point.counts |
Parameter |
... |
Parameter |
Parameter
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | ## Not run:
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (x, fs, fe, return.list = F, return.unique = F, sorted = F,
return.point.counts = F, ...)
{
if (is.null(x) | length(x) < 1) {
return(c())
}
if (!sorted) {
ox <- rank(x, ties.method = "first")
x <- sort(x)
}
se <- c(fs, fe)
fi <- seq(1:length(fs))
fi <- c(fi, -1 * fi)
fi <- fi[order(se)]
se <- sort(se)
storage.mode(x) <- storage.mode(fi) <- storage.mode(se) <- "integer"
if (return.unique) {
iu <- 1
}
else {
iu <- 0
}
if (return.list) {
il <- 1
}
else {
il <- 0
}
if (return.point.counts) {
rpc <- 1
}
else {
rpc <- 0
}
storage.mode(iu) <- storage.mode(il) <- storage.mode(rpc) <- "integer"
result <- .Call("points_within", x, se, fi, il, iu, rpc)
if (!sorted & !return.point.counts) {
result <- result[ox]
}
return(result)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.