ip_to_hex {ipaddress} | R Documentation |
Represent address as hexadecimal
Description
Encode or decode an ip_address
as a hexadecimal string.
Usage
ip_to_hex(x)
hex_to_ip(x, is_ipv6 = NULL)
Arguments
x |
|
is_ipv6 |
A logical vector indicating whether to construct an IPv4 or
IPv6 address. If |
Value
-
ip_to_hex()
: A character vector -
hex_to_ip()
: Anip_address
vector
See Also
Other address representations:
ip_to_binary()
,
ip_to_bytes()
,
ip_to_integer()
Examples
x <- ip_address(c("192.168.0.1", "2001:db8::8a2e:370:7334", NA))
ip_to_hex(x)
hex_to_ip(ip_to_hex(x))
[Package ipaddress version 1.0.2 Index]