grts_aim: Draw spatially balanced points with 'spsurvey::grts()',...

View source: R/grts.aim.r

grts_aimR Documentation

Draw spatially balanced points with spsurvey::grts(), output in AIM format

Description

A wrapper for spsurvey::grts() that modifies the output SPDF to match the format expected by other parts of the AIM workflow, including distribution to field crews and populating design databases.

Usage

grts_aim(
  design_object = NULL,
  n_base = NULL,
  n_over = NULL,
  project_name = "Design name",
  frame,
  stratum_var = "STRATUM",
  seed_number = NULL,
  projection = NULL
)

Arguments

design_object

Optional if not providing n_base and n_over. A list of lists structured and named according to the requirements of spsurvey::grts() prior to version 5.3.0. Can be automatically constructed with allocate.panels().

n_base

Optional if not providing design_object. A named numeric value for the numbers of base points to draw in each stratum in the design. Names must match the values in frame in the variable specified by stratum_field.

n_over

Optional if not providing design_object. A named numeric value for the numbers of oversample (spare) points to draw in each stratum in the design. Names must match the values in frame in the variable specified by stratum_field.

project_name

A character string of the name to use for the design, often the name of the project.

frame

Polygon sf object with a variable name matching stratum_field which contains values matching the strata names in design_object OR in n_base and n_over.

stratum_var

A character string representing the name of the variable in frame containing the strata names matching those in design_object OR in n_base and n_over. Defaults to "STRATUM".

seed_number

An optional numeric value to be passed to set.seed() to make the output reproducible. If NULL then a random seed will be used. Defaults to NULL.

projection

Optional character string or CRS object. The projection to reproject the frame into if no NULL. Defaults to NULL.

Value

A Spatial Points Data Frame of the sampling locations with the fields PLOTID, STRATUM, PANEL, IntPtWt (initial point weight), xcoord, and ycoord


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