addHolesToPolygons: Add holes to polygons

View source: R/utils.R

addHolesToPolygonsR Documentation

Add holes to polygons

Description

Add holes to a data.frame of cell polygon coordinates

Usage

addHolesToPolygons(poly)

Arguments

poly

A data.frame storing cell polygon coordinates. Expected columns include

  • "cell" storing the cell ID,

  • "x" storing x-coordinates of the polygon corners,

  • "y" storing the y-coordinates of the polygon corners.

Value

A data.frame

Examples

     x <- c(2053, 2053, 2053, 2056, 2059, 2059)
     y <- c(51, 54, 57, 57, 57, 54)
     poly <- data.frame(cell = 1, x = x, y = y)
     poly <- addHolesToPolygons(poly)

ccb-hms/MerfishData documentation built on Aug. 19, 2022, 8:55 a.m.