convert between numeric and dotted-decimal IPv4 forms.
ip_to_numeric takes IP addresses stored
in their human-readable representation ("192.168.0.1")
and converts it to a numeric representation (3232235521).
numeric_to_ip performs the same operation, but in reverse.
Due to limitations in R's support for colossally
big numbers, this currently only works for IPv4 IP addresses.
1 2 3
a vector of IP addresses, in their numeric or dotted-decimal form depending on the function.
ip_to_numeric: a vector containing the numeric representation of
If an IP is invalid (either because it's an Ipv6 address, or isn't an IP address
at all) the returned value for that IP will be 0.
numeric_to_ip: a vector containing the dotted-decimal representation of
as character strings. If a value cannot be resolved to an IPv4 address, it will appear as "0.0.0.0" or
an empty string.
1 2 3 4 5 6 7
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.