-
Notifications
You must be signed in to change notification settings - Fork 26
/
README.Rmd
73 lines (49 loc) · 2.94 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
output: rmarkdown::github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
[![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.44526.svg)](https://zenodo.org/record/44526)
[![Travis-CI Build Status](https://travis-ci.org/hrbrmstr/iptools.svg?branch=master)](https://travis-ci.org/hrbrmstr/iptools)
[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/0.1.0/active.svg)](https://www.repostatus.org/#active)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/iptools)](httsp://cran.r-project.org/web/packages/iptools)
![downloads](https://cranlogs.r-pkg.org/badges/grand-total/iptools)
## 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 in `Rcpp` and require installation of the `AsioHeaders` package. A current, lofty goal is to mimic most of the functionality of the Python `iptools` module and make IP addresses first class R objects.
Available [on CRAN](http://cran.r-project.org/web/packages/iptools/)
### NEW FOR 0.3.0.x+!
Thanks to @eddelbuettel we've thinned down this version of `iptools` 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, with `ip_to_numeric` and `numeric_to_ip`;
- Validating and classifying IP addresses with `ip_classify`;
- Range generation and checking with `range_boundaries`, `range_generate` and `validate_range`, `country_ranges`, and;
- Several inbuilt IP-related datasets.
For more information, see the vignettes on [the functionality](https://github.com/hrbrmstr/iptools/blob/master/vignettes/introduction_to_iptools.Rmd) and [the datasets](https://github.com/hrbrmstr/iptools/blob/master/vignettes/iptools_datasets.Rmd) within `iptools`.
### Installation
To install the development version:
```{r install, eval=FALSE}
devtools::install_github("hrbrmstr/iptools")
# or
install.packages("iptools")
```
`iptools` depends on the [AsioHeaders](https://github.com/eddelbuettel/asioheaders) package which is now in CRAN.
### Test Results
```{r test}
library(iptools)
library(testthat)
date()
test_dir("tests/")
```
## iptools Metrics
```{r echo=FALSE}
cloc::cloc_pkg_md()
```
### Code of Conduct
Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.