Movatterモバイル変換


[0]ホーム

URL:


iptools

DOITravis-CI Build StatusProject Status: Active - The project has reached a stable, usable state and is being actively developed.CRAN_Status_Badgedownloads

Easy IP address handling with iptools

iptools is a set of tools for working with IP addresses. The aim is to provide functionality not presently available with any existing R package and to do so with as much speed as possible. To that end, many of the operations are written inRcpp and require installation of theAsioHeaders package. A current, lofty goal is to mimic most of the functionality of the Pythoniptools module and make IP addresses first class R objects.

Availableon CRAN

NEW FOR 0.3.0.x+!

Thanks to @eddelbuettel we’ve thinned down this version ofiptools and it should also work on Windows now!

Functionality

The package primarily supports IPv4 addresses due to deficiencies in R’s support for large numbers, but there is IPv6 support for some functionality, and we plan to build more in as R improves and as we do. Functionality includes:

  • Converting IP addresses to their numeric form, and then back to strings, withip_to_numeric andnumeric_to_ip;
  • Validating and classifying IP addresses withip_classify;
  • Range generation and checking withrange_boundaries,range_generate andvalidate_range,country_ranges, and;
  • Several inbuilt IP-related datasets.

For more information, see the vignettes onthe functionality andthe datasets withiniptools.

Installation

To install the development version:

devtools::install_github("hrbrmstr/iptools")# orinstall.packages("iptools")

iptools depends on theAsioHeaders package which is now in CRAN.

Test Results

library(iptools)library(testthat)date()#> [1] "Fri Apr 29 15:02:00 2016"test_dir("tests/")#> testthat results ===========================================================#> OK: 75 SKIPPED: 0 FAILED: 0#>#> DONE ======================================================================

Code of Conduct

Please note that this project is released with aContributor Code of Conduct. By participating in this project you agree to abide by its terms.


[8]ページ先頭

©2009-2025 Movatter.jp