bbox_center: Find center of bounding box

View source: R/utils.R

bbox_centerR Documentation

Find center of bounding box

Description

Get x-y coordinates of the center of any bounding box

Usage

bbox_center(bbox)

Arguments

bbox

A numeric vector of length 4 with names xmin, xmax, ymin, ymax, in any order.

Value

A numeric vector of length 2.

Examples

bbox <- c(xmin = 0, xmax = 100, ymin = 0, ymax = 80)
bbox_center(bbox)

pachterlab/SpatialFeatureExperiment documentation built on Aug. 23, 2024, 11:38 p.m.