position_to_coords {hilbert} | R Documentation |
Convert Grid Positions to Coordinates
Description
Convert Grid Positions to Coordinates
Usage
position_to_coords(x, ..., n = 10L, extent = NULL)
## S3 method for class 'data.frame'
position_to_coords(x, ..., n, extent, coords = c(1, 2), attach = TRUE)
## S3 method for class 'matrix'
position_to_coords(x, ..., n, extent, coords = c(1, 2), attach = TRUE)
## S3 method for class 'numeric'
position_to_coords(x, y, ..., n, extent)
## S3 method for class 'double'
position_to_coords(x, y, ..., n, extent)
## S3 method for class 'integer'
position_to_coords(x, y, ..., n, extent)
position_to_coords64(x, ..., n = 10L, extent = NULL)
## S3 method for class 'data.frame'
position_to_coords64(x, ..., n, extent, coords = c(1, 2), attach = TRUE)
## S3 method for class 'matrix'
position_to_coords64(x, ..., n, extent, coords = c(1, 2), attach = TRUE)
## S3 method for class 'numeric'
position_to_coords64(x, y, ..., n, extent)
## S3 method for class 'double'
position_to_coords64(x, y, ..., n, extent)
## S3 method for class 'integer64'
position_to_coords64(x, y, ..., n, extent)
## S3 method for class 'bitstring'
position_to_coords64(x, y, ..., n, extent)
Arguments
x |
One of: Integer 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 |
Integer vector corresponding to Column positions. |
Value
A data.frame
containing the coordinates as numeric
columns x
and y
, or the original object
(data.frame
or matrix
) with the positions
replaced with the coordinates.