coordinates: Coordinates

coordinatesR Documentation

Coordinates

Description

Functions that work with coordinates.

Usage

x_corner(dimension, extent = NULL)

y_corner(dimension, extent = NULL)

x_centre(dimension, extent = NULL)

y_centre(dimension, extent = NULL)

x_from_col(dimension, extent = NULL, col)

y_from_row(dimension, extent = NULL, row)

col_from_x(dimension, extent = NULL, x)

row_from_y(dimension, extent = NULL, y)

xy(dimension, extent = NULL)

Arguments

dimension

integer ncol, nrow

extent

numeric extent xmin,xmax,ymin,ymax

col

column index

row

row index

x

x coordinate

y

y coordinate

Value

x coordinate of corners

y coordinate of corners

x coordinate of centres

y coordinate of centres

x coordinate of col (centre)

y coordinate of row (centre)

col of x coordinate

y coordinate (centre) of row

xy coordinate (centre) of grid

Examples

x_corner(c(10, 5), c(0, 10, 0, 5))
y_corner(c(10, 5), c(0, 10, 0, 5))
x_centre(c(10, 5), c(0, 10, 0, 5))
y_centre(c(10, 5), c(0, 10, 0, 5))
x_from_col(c(10, 5), c(0, 10, 0, 5), 2:3)
y_from_row(c(10, 5), c(0, 10, 0, 5), 2:3)
col_from_x(c(10, 5), c(0, 10, 0, 5), 3.5 + 1:2)
row_from_y(c(10, 5), c(0, 10, 0, 5), 2:3)
xy(c(10, 5), c(0, 10, 0, 5))

hypertidy/vaster documentation built on June 10, 2025, 8:09 a.m.