poleInaccessibility | R Documentation |
Find a binary pole of inaccessibility
poleInaccessibility2(
x = NULL,
y = NULL,
DT = NULL,
x_range = NULL,
y_range = NULL,
copy_DT = TRUE
)
poleInaccessibility3(
x = NULL,
y = NULL,
DT = NULL,
x_range = NULL,
y_range = NULL,
copy_DT = TRUE,
test_both = TRUE
)
x, y |
Coordinates. |
DT |
A |
x_range, y_range |
Numeric vectors of length-2; the range of |
copy_DT |
(logical, default: |
test_both |
(logical, default: |
poleInaccessibility2
A named vector containing the
xmin
, xmax
and
ymin
, ymax
coordinates of
the largest rectangle of width an integer power of two that is empty.
poleInaccessibility3
Starting with the rectangle formed by poleInaccessibility2
,
the rectangle formed by stretching it out vertically and horizontally until
the edges intersect the points x,y
library(data.table)
library(hutils)
# A square with a 10 by 10 square of the northeast corner removed
x <- runif(1e4, 0, 100)
y <- runif(1e4, 0, 100)
DT <- data.table(x, y)
# remove the NE corner
DT_NE <- DT[implies(x > 90, y < 89)]
DT_NE[, poleInaccessibility2(x, y)]
DT_NE[, poleInaccessibility3(x, y)]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.