getBASSample {spbal}R Documentation

Generate the BAS sample.

Description

This function is repeatedly called from function spbal::getBASSampleDriver to generate a BAS sample.

Usage

getBASSample(shapefile, bb, n, seeds, boxes = NULL)

Arguments

shapefile

Shape file as a polygon (sp or sf) to select sites for.

bb

Bounding box which defines the area around the study area. A bounding box must be supplied.

n

Number of sites to select. If using stratification it is a named vector containing sample sizes of each group.

seeds

A vector of 2 seeds, u1 and u2. seeds must have a value when this function is called.

boxes

A vector of integers for which points along the Halton random starting point to sample from.

Value

A list containing two variables, $sample containing locations in the BAS sample, in BAS order and $seeds, the u1 and u2 seeds used to generate the sample.

Author(s)

This function was written by Phil Davies.


[Package spbal version 1.0.0 Index]