Learn R Programming

IPtoCountry (version 0.0.1)

IP_integer: Convert IP address to IP integer

Description

Convert IP address to IP integer

Usage

IP_integer(IP.address)

Arguments

IP.address
a character or factor vector of one or more IP addresses

Value

Returns a numeric vector of IP integers from IP.address. The coversion formula used here splits the string into four octets, multiplies the first three by 256^(4-n), and takes the sum of the four modified octets.

Examples

Run this code
head(IP_integer(IPs))

Run the code above in your browser using DataLab