| a5_u64_to_hex | R Documentation |
a5_u64_to_hex() converts an a5_cell vector to 16-character
zero-padded hex strings. a5_hex_to_u64() converts hex strings to
an a5_cell vector.
a5_u64_to_hex(x)
a5_hex_to_u64(x)
x |
For |
These are named to match u64_to_hex / hex_to_u64 in the upstream
Python, JavaScript, and DuckDB A5 bindings. In those languages the
functions convert between a native 64-bit unsigned integer and its hex
representation. Because R has no native uint64 type, a5_u64_to_hex()
accepts an a5_cell (which stores the u64 internally as eight raw
bytes) instead of a bare integer.
a5_u64_to_hex() returns a character vector. a5_hex_to_u64()
returns an a5_cell vector.
a5_cell_from_arrow() and a5_cell_to_arrow() for lossless
conversion between a5_cell and Arrow uint64 arrays.
cell <- a5_lonlat_to_cell(-3.19, 55.95, resolution = 5)
hex <- a5_u64_to_hex(cell)
hex
a5_hex_to_u64(hex)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.