getBASSample {spbal} | R Documentation |
This function is repeatedly called from function spbal::getBASSampleDriver to generate a BAS sample.
getBASSample(shapefile, bb, n, seeds, boxes = NULL)
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. |
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.
This function was written by Phil Davies.