balance_around: Combine existing and new points to create a spatially...

View source: R/balance_around.R

balance_aroundR Documentation

Combine existing and new points to create a spatially balanced design

Description

Combine existing and new points to create a spatially balanced design

Usage

balance_around(
  existing_points,
  new_points,
  stratafield = NULL,
  id_var,
  projection = "+proj=longlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0"
)

Arguments

existing_points

Point sf object. The existing points that will be balanced around.

new_points

Point sf object. The points that will be compared against the existing points and selected from to create a balanced design.

stratafield

Character string. The name of the variable in common between existing_points and new_points that contains stratum identities. This is used to balance by stratum. If NULL then balancing will not take strata into account. Defaults to NULL.

id_var

Character string. The name of the variable common between existing_points and new_points that contains point identities. This assumes that the format of plot IDs is "character-number".

projection

CRS object or character string. The projection to force on the spatial objects. Defaults to "+proj=longlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0".

Value

A point sf object containing all the points from existing_points and the selected points from new_points. The projection will match projection.


nstauffer/sample.design documentation built on May 9, 2022, 3:21 a.m.