sample_systematic: Systematically sample survey units

View source: R/sampling.R

sample_systematicR Documentation

Systematically sample survey units

Description

sample_systematic() generates a systematic sample of survey units.

Usage

sample_systematic(units, n, start = 1, column = "sample")

Arguments

units

An sf object of survey units.

n

Step size, i.e. selects every nth unit.

start

Index of the unit to start sampling from.

column

Name of the column to be added. Default: "sample".

Value

units with an additional boolean column describing the sample.

Examples

library(magrittr)
library(ggplot2)

rpolygon() %>%
  quadrats(n = c(10, 10)) %>%
  sample_systematic(n = 10) %>%
  ggplot(aes(fill = sample)) + geom_sf()

joeroe/fieldwalkr documentation built on Feb. 17, 2024, 12:15 a.m.