By Bob Rudis (@hrbrmstr)
Wed 01 July 2015
|
tags:
blog,
r,
rstats,
ip,
-- (permalink)
We are happy to announce that the iptools
package is now on CRAN. Formerly only available on GitHub, iptools
now compiles under Debian/Ubuntu, Fedora/CentOS/RedHat and Mac OS X (we’re still working on that other operating system).
Oliver (the package co-author and on-CRAN instigator) wrote some excellent vignettes that cover the functionality of the package in-depth, but here’s a short-list of what you can find/expect in iptools
:
- wicked-fast IP conversions (
148
milliseconds for converting 1,000,000 addresses to integers and700
milliseconds the other way ‘round) - IP classification with
ip_classify
which can distinguish IPv4, IPv6 and non-IP address inputs - hostname resolution (both ways) with
hostname_to_ip
andip_to_hostname
plus, ways to handle CIDR blocks and generate random (but valid) IPv4 addresses.
We’ve also included some core IANA datasets and provided routines to refresh them.
iptools
pairs nicely with urltools, webtools, longurl and rgeolocate, enabling many avenues of feature generation (for machine learning) and data analysis for cybersecurity and web analytics.
If you manage to get it working well on Windows, drop us a note in the comments (you’ll get a free copy of Data-Driven Security) and if you’ve use iptools
in any cool projects hit us up here or on Twitter so we can get you on the podcast.