volcano_polygon: Generate a polygon for the volcano stars

View source: R/volcano.R

volcano_polygonR Documentation

Generate a polygon for the volcano stars

Description

Generate a polygon for the volcano stars

Usage

volcano_polygon()

Value

simple feature geometry for a POLYGON

Examples

## Not run: 
library(dplyr)
x <- volcano_stack(indexed = TRUE)
p <- volcano_polygon()
pts <- randomPts(x, polygon = p)
par(mfrow = c(1,3))
for (i in seq_len(3)){
  plot(x[[i]], main = paste("Layer", i))
  plot(p, add = TRUE)
  with(pts |> dplyr::filter(layer == i), points(x, y))
}

## End(Not run)

BigelowLab/twinkle documentation built on Jan. 26, 2025, 6:34 a.m.