segment_region: Divide a region into equal parts.

Description Usage Arguments Value

View source: R/segment_region.R

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

1
2
3
4
5
6
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


cape documentation built on Feb. 10, 2021, 5:06 p.m.