Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

🍴 A toolkit for manipulating, validating and testing IP addresses and ranges, along with datasets relating to IP addresses. While it primarily has support for the IPv4 address space, more extensive IPv6 support is intended.

License

NotificationsYou must be signed in to change notification settings

hrbrmstr/iptools

Repository files navigation

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 toprovide functionality not presently available with any existing Rpackage and to do so with as much speed as possible. To that end, manyof the operations are written inRcpp and require installation of theAsioHeaders package. A current, lofty goal is to mimic most of thefunctionality of the Pythoniptools module and make IP addresses firstclass R objects.

Availableon CRAN

NEW FOR 0.3.0.x+!

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

Functionality

The package primarily supports IPv4 addresses due to deficiencies in R’ssupport for large numbers, but there is IPv6 support for somefunctionality, 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 tostrings, 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 onthefunctionalityandthedatasetswithiniptools.

Installation

To install the development version:

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

iptools depends on theAsioHeaders package whichis now in CRAN.

Test Results

library(iptools)library(testthat)date()#> [1] "Sun Oct 14 11:29:55 2018"test_dir("tests/")#> ✔ | OK F W S | Context#> ══ testthat results  ══════════════════════════════════════════════════════#> OK: 82 SKIPPED: 0 FAILED: 0#>#> ══ Results ════════════════════════════════════════════════════════════════#> Duration: 0.4 s#>#> OK:       0#> Failed:   0#> Warnings: 0#> Skipped:  0

iptools Metrics

Lang# Files(%)LoC(%)Blank lines(%)# Lines(%)
C++40.138460.521670.383750.28
R200.674440.271330.316380.47
HTML20.072280.14470.1120.00
Rmd30.10600.04570.131090.08
C/C++ Header10.03370.02300.072230.17

Code of Conduct

Please note that this project is released with aContributor Code ofConduct. By participating in this project you agree toabide by its terms.

About

🍴 A toolkit for manipulating, validating and testing IP addresses and ranges, along with datasets relating to IP addresses. While it primarily has support for the IPv4 address space, more extensive IPv6 support is intended.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp