getBASSampleDriver | R Documentation |
This function repeatedly calls function spbal::getBASSample to generate the BAS sample. Once the requested number of points within the intersection of the shapefile and the study area have been obtained, the sample and seeds are returned to the caller.
getBASSampleDriver(shapefile, bb, n, seeds, verbose = FALSE)
shapefile |
sf shape file as a polygon to select sites from. |
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. If not specified, the default is NULL and will be defined randomly. |
verbose |
Boolean if you want to see any output printed to screen. Helpful if taking a long time. Default is FALSE i.e. no informational messages are displayed. |
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 based on origin code by Paul van Dam-Bates from the BASMasterSample package.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.