Learn R Programming

affiner (version 0.1.3)

bounding_ranges: Compute axis-aligned ranges

Description

range() computes axis-aligned ranges for Coord1D, Coord2D, and Coord3D class objects.

Usage

# S3 method for Coord1D
range(..., na.rm = FALSE)

# S3 method for Coord2D range(..., na.rm = FALSE)

# S3 method for Coord3D range(..., na.rm = FALSE)

Value

Either a Coord1D, Coord2D, or Coord3D object of length two. The first element will have the minimum x/y(/z) coordinates and the second element will have the maximum x/y(/z) coordinates of the axis-aligned ranges.

Arguments

...

Coord1D, Coord2D, or Coord3D object(s)

na.rm

logical, indicating if NA's should be omitted

Examples

Run this code
range(as_coord2d(rnorm(5), rnorm(5)))
range(as_coord3d(rnorm(5), rnorm(5), rnorm(5)))

Run the code above in your browser using DataLab