View source: R/coords_to_position.R
coords_to_position | R Documentation |
Convert Coordinates to Grid Positions
coords_to_position(x, ..., n = 10L, extent = NULL) ## S3 method for class 'data.frame' coords_to_position(x, ..., n, extent, coords = c(1, 2), attach = TRUE) ## S3 method for class 'matrix' coords_to_position(x, ..., n, extent, coords = c(1, 2), attach = TRUE) ## S3 method for class 'numeric' coords_to_position(x, y, ..., n, extent) ## S3 method for class 'double' coords_to_position(x, y, ..., n, extent) ## S3 method for class 'integer' coords_to_position(x, y, ..., n, extent) coords_to_position64(x, ..., n = 10L, extent = NULL) ## S3 method for class 'data.frame' coords_to_position64(x, ..., n, extent, coords = c(1, 2), attach = TRUE) ## S3 method for class 'matrix' coords_to_position64(x, ..., n, extent, coords = c(1, 2), attach = TRUE) ## S3 method for class 'numeric' coords_to_position64(x, y, ..., n, extent) ## S3 method for class 'double' coords_to_position64(x, y, ..., n, extent) ## S3 method for class 'integer' coords_to_position64(x, y, ..., n, extent)
x |
One of: Numeric vector, |
... |
Unused. |
n |
Exponent to the dimensions of the underlying grid. The Hilbert
Curve indices are based on a |
extent |
Named vector with names |
coords |
Column names or indices of a |
attach |
If |
y |
Numeric vector corresponding to Y coordinates. |
A data.frame
containing the positions as integer
columns x
and y
, or the original object
(data.frame
or matrix
) with the coordinates
replaced with the grid positions. When n
is greater than 15,
the positions are of type bit64::integer64
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.