sample_systematic | R Documentation |
sample_systematic()
generates a systematic sample of survey units.
sample_systematic(units, n, start = 1, column = "sample")
units |
An sf object of survey units. |
n |
Step size, i.e. selects every |
start |
Index of the unit to start sampling from. |
column |
Name of the column to be added. Default: "sample". |
units
with an additional boolean column describing the sample.
library(magrittr)
library(ggplot2)
rpolygon() %>%
quadrats(n = c(10, 10)) %>%
sample_systematic(n = 10) %>%
ggplot(aes(fill = sample)) + geom_sf()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.