segment_region: Divide a region into equal parts.

View source: R/segment_region.R

segment_regionR Documentation

Divide a region into equal parts.

Description

This is an internal function used to segment regions for plotting. It returns n evenly spaced points in a given region. The points can be aligned to the ends of the interval, or centered in the interval.

Usage

segment_region(
  region_min,
  region_max,
  num_points,
  alignment = c("center", "ends")
)

Arguments

region_min

A numerical value indicating the minimum value of the region.

region_max

A numerical value indicating the maximum value of the region.

num_points

The number of points to place in the region.

alignment

A character element indicating whether the points should be centered within the region or whether they should extend to the ends of the region.

Value

Returns n points spaced evenly across the defined region


TheJacksonLaboratory/CAPE documentation built on Feb. 12, 2024, 4:32 p.m.