Description Usage Arguments Details Value See Also Examples
Converts a string hexadecimal representation to a raw
vector.
1 | hex2raw(hex)
|
hex |
character string or character vector containing a hexadecimal representation. |
Non-hexadecimal characters are removed.
A raw
vector.
The return value is a list
of raw
vectors when the argument
hex
contains more than one hexadecimal representation.
raw2hex
in package
PKI, readWKB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # create a character string containing a hexadecimal representation
hex <- "0101000000000000000000f03f0000000000000840"
# convert to raw vector
wkb <- hex2raw(hex)
# create a character vector containing a hexadecimal representation
hex <- c("01", "01", "00", "00", "00", "00", "00", "00", "00", "00", "00",
"f0", "3f", "00", "00", "00", "00", "00", "00", "08", "40")
# convert to raw vector
wkb <- hex2raw(hex)
# create vector of two character strings each containing a hex representation
hex <- c("0101000000000000000000f03f0000000000000840",
"010100000000000000000000400000000000000040")
# convert to list of two raw vectors
wkb <- hex2raw(hex)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.