get_data_ptr() returns a character string representation of the address
of the first value in the C array underlying a given R vector of raw,
integer, double or complex. The returned string is suitable for use
as a DATAPOINTER for a GDAL MEM dataset
(https://gdal.org/en/stable/drivers/raster/mem.html).
Examples
v <- sample(0:255, 20, replace = TRUE)
get_data_ptr(v)
#> [1] "0x5610e28b0a58"