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

View source: R/findFirstStudyRegionPoint.R

findFirstStudyRegionPointR Documentation

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

Description

This function repeatedly calls function spbal::getBASSample to generate the Halton frame sample. This function selects the first point at random from those points in the study area. This point and the seeds used to generate the sample are returned to the caller.

Usage

findFirstStudyRegionPoint(shapefile, bb, seeds, verbose = FALSE)

Arguments

shapefile

Shape file as a polygon (sp or sf) of the study area(s).

bb

Bounding box which defines the Master Sample. A bounding box must be supplied.

seeds

A vector of 2 seeds, u1 and u2. If not specified, the default is NULL and will be defined randomly using function generateUVector.

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.

Value

A list containing three variables:

  • seeds The u1 and u2 seeds used to generate the first point.

  • k The index of the first point in the initial sample.

Author(s)

This function was written by Phil Davies.


spbal documentation built on April 4, 2025, 2:05 a.m.