Encode or decode an
ip_address as an integer.
1 2 3
A logical vector indicating whether to construct an IPv4 or
IPv6 address. If
It is common to represent an IP address as an integer, by reinterpreting
the bit sequence as a big-endian unsigned integer. This means IPv4 and IPv6
addresses can be represented by 32-bit and 128-bit unsigned integers.
In this way, the IPv4 addresses
255.255.255.255 would be
represented as 0 and 4,294,967,295.
The numeric data types within base R (
insufficient precision to cover the IPv6 address space. Instead we return a
bignum::biginteger vector, which supports arbitrary precision integers.
1 2 3 4 5 6 7 8 9
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.