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

View source: R/findFirstStudyRegionPoint.R

findRandomHaltonIndexR Documentation

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

Description

This function uses sf::st_sample() to generate a random point in the study region. it then maps that point to the Halton Sequence to ensure that the random starting point is within the region. this function is used internally, and is called by a wrapper findBASSeed().

Usage

findRandomHaltonIndex(shapefile, bb, n = 1, uplim = 10^6, verbose = FALSE)

Arguments

shapefile

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

bb

Bounding box which defines the sample. A bounding box must be supplied and may not necessarily be the bounding box of the provided shape.

n

Number of seeds to produce.

uplim

Limit of how accurate to be mapping point to Halton sequence. Not advised larger than 10^15.

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 matrix with n rows and 2 columns.

Author(s)

Paul van Dam-Bates and Blair Robertson


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