spbal1.0.1 package

Spatially Balanced Sampling Algorithms

BAS

Balanced Acceptance Sampling (BAS).

BoundingBox

Create a bounding box for a study region.

contains_feature

Check if the sf object contains a specified feature.

cppBASpts

Generate numbers from a Halton Sequence.

cppBASptsIndexed

Generate numbers from a Halton Sequence along a specified set of indic...

cppRSHalton_br

Generate numbers from a Halton Sequence with a random start

filterOnDistance

Filter sample using a minimum distance.

findBASSeed

Randomly generates a point in the study region and maps it to the Halt...

findFirstStudyRegionPoint

Get a randomly chosen Halton point from within the study area and the ...

findRandomHaltonIndex

Randomly generates a point in the study region and maps it to the Halt...

generateUVector

Generate a vector of two random seeds.

getBASSample

Generate the BAS sample.

getBASSampleDriver

Manage BAS sampling.

getHaltonFrame

Obtain a Halton Frame over a shapefile.

getHaltonPointsFromExpandableGrid

Generate a Halton frame.

getPanel

Extract all points with a specified panel id from a sample.

getSample

Extract a sample of a specified size from a master sample.

HaltonFrame

Create a Halton Frame.

HaltonFrameBase

Generate a Halton Frame.

HIP

Halton Iterative Partitioning (HIP).

hipIndexRandomPermutation

Permute Halton indices.

hipPartition

Partition the population.

hipX1split

First dimension split.

hipX2split

Second dimension split.

is_sf_points

Check if an object is an sf points object.

log_a_to_base_b

Compute the log of a to base b.

mod

Vector modulus.

PanelDesignAssignPanelids

Assign panel ids to the samples.

removeDuplicates

Remove duplicate values from a NumericVector.

rot

Generate a rotation matrix for rotating objects later.

rotate.scale.coords

Scale and rotate points from the unit square to a defined projection.

setBASIndex

Finds a set of Halton indices that will create BAS points within a sha...

SRS

Simple random sampling.

validate_parameters

Validate spbal function parameters.

ValidatePanelDesign

Validate the panels and panel_overlap parameters.

Encapsulates a number of spatially balanced sampling algorithms, namely, Balanced Acceptance Sampling (equal, unequal, seed point, panels), Halton frames (for discretizing a continuous resource), Halton Iterative Partitioning (equal probability) and Simple Random Sampling. Robertson, B. L., Brown, J. A., McDonald, T. and Jaksons, P. (2013) <doi:10.1111/biom.12059>. Robertson, B. L., McDonald, T., Price, C. J. and Brown, J. A. (2017) <doi:10.1016/j.spl.2017.05.004>. Robertson, B. L., McDonald, T., Price, C. J. and Brown, J. A. (2018) <doi:10.1007/s10651-018-0406-6>. Robertson, B. L., van Dam-Bates, P. and Gansell, O. (2021a) <doi:10.1007/s10651-020-00481-1>. Robertson, B. L., Davies, P., Gansell, O., van Dam-Bates, P., McDonald, T. (2025) <doi:10.1111/anzs.12435>.

  • Maintainer: Phil Davies
  • License: MIT + file LICENSE
  • Last published: 2025-03-28