autoplot.fieldopt_sample: Plot a sample of units

View source: R/sampling.R

autoplot.fieldopt_sampleR Documentation

Plot a sample of units

Description

Plot a sample of units

Usage

## S3 method for class 'fieldopt_sample'
autoplot(object, ...)

Arguments

object

A fieldopt_sample.

...

Unused.

Value

A ggplot of the frame with the sampled units highlighted, coloured by stratum when the sample is stratified, with longitude on the x axis for geographic coordinates.

Examples

cells <- expand.grid(x = 1:12, y = 1:12)
cells$h <- ifelse(cells$x <= 6, "west", "east")
autoplot(select_units(cells, n = 20, strata = "h", seed = 3))

fieldopt documentation built on Oct. 22, 2026, 1:07 a.m.