data2shape: Make shapes from data

View source: R/a_early.R

data2shapeR Documentation

Make shapes from data

Description

Allows a data.frame or tibble to be converted to shape objects.

Usage

data2shape(data, shape)

Arguments

data

data.frame or tibble

shape

shape function

Value

shape object

Examples

d <- data.frame(
  x = 1:2,
  y = 1:2,
  fill = c("blue", "forestgreen"),
  color = NA,
  radius = c(.25,0.5))

ggdiagram() +
  data2shape(d, ob_circle)

ggdiagram documentation built on Sept. 15, 2025, 1:07 a.m.