check_existing: Check existing sample data against requirements

View source: R/utils-existing.R

check_existingR Documentation

Check existing sample data against requirements

Description

This function checks whether the existing sample data meets certain requirements for use in downstream analyses.

Usage

check_existing(existing, raster, nSamp, plot = FALSE, details = NULL)

Arguments

existing

sf 'POINT'. Existing plot network.

raster

SpatRaster. Raster to guide the location of the samples. If type = "clhs" this raster can also be used to define the population distributions to be used for sampling.

nSamp

Numeric. Number of desired samples.

details

Logical. If FALSE (default) output is sf object of systematic samples. If TRUE returns a list of sf objects where tessellation is the tessellation grid for sampling, and samples are the systematic samples.

Value

If requirements are met, the function returns the prepared existing sample data. Otherwise, it raises a stop error with a relevant message.


tgoodbody/sgsR documentation built on March 7, 2024, 2:20 a.m.