Description Usage Arguments Details Value Author(s) See Also Examples
Draws a Halton Iterative Partition (HIP) sample from a
SpatialPoints* object.
1 | hip.polygon(x, n, bases = c(2, 3), J = c(8, 5))
|
x |
A |
n |
Target sample size. Target number of locations to draw from the set of points
contained in |
bases |
2X1 vector of Halton bases. These must be co-prime. |
J |
A 2X1 vector of base powers. |
A brief description of Halton Iterative Partition (HIP) sampling for polygons:
Given a set of Halton Iterative Partition parameters x (SpatialPoints* object), n (sample size),
bases, and J,
a lattice of Halton boxes is constructed iteratively over the bounding box of the input points.
This results in prod(bases^J) Halton boxes on the bounding box to cover all points in the point resource. The
target should be one point per box, or prod(bases^J) == n.
The Halton index of all boxes is computed and assigned to points that lie
in each box. Finally, a random number between 0 and the largest Halton index is
drawn, and the next n coordinates in the mapped real numbers are taken as
the sample.
A SpatialPoints* object containing locations in the HIP sample.
Additional attributes of the output object, beyond those which
make it a SpatialPoints*, are:
frame: Name of the input sampling frame.
frame.type: Type of resource in sampling frame. (i.e., "polygon").
sample.type: Type of sample drawn. (i.e., "HIP").
J: Exponents of the bases used to form the lattice of
Halton boxes. This is either the input J, or the J vector
computed by halton.indices.
bases: Bases of the Halton sequence used to draw the sample.
hl.bbox: The bounding box around points in x used to
draw the sample. See halton.indices.
Michael Kleinsasser, Aidan McDonald
1 2 3 4 | # Draw sample of cities in the state of Washington
data(WA)
samp <- hip.polygon( WA, 100, J = c(3,2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.