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

View source: R/findFirstStudyRegionPoint.R

findBASSeedR Documentation

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

Description

This function uses sf::st_sample() internally 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. That point is approximately mapped, and thus a check to make sure the new point is still within the study region is completed. This function is used internally, but may useful for a user to generate multiple seeds in advance in a simulation study using BAS.

Usage

findBASSeed(shapefile, bb, n = 1, 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.

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 vector when n = 1 (Default), or a matrix when n > 1.

Author(s)

Paul van Dam-Bates


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