R: Determine if a vector if IPv4 addresses are in a vector of...

ips_in_cidrs {iptools} | R Documentation

## Determine if a vector if IPv4 addresses are in a vector of CIDRs

### Description

Determine if a vector if IPv4 addresses are in a vector of CIDRs

### Usage

    ips_in_cidrs(ips, cidrs)

### Arguments

`ips` | character vector or numeric vector of IPv4 addresses
`cidrs` | character vector or numeric vector of IPv4 CIDRs

### Value

`data_frame` with `ips` column and a logical `in_cdir` column

### Note

auto-appends `/32` if a bare IPv4 is detected

### Examples

    ips_in_cidrs(
      c("4.3.2.1", "1.2.3.4", "1.20.113.10", "5.190.145.5"),
      c("5.190.144.0/21", "1.20.113.0/24")
    )

[Package iptools version 0.6.1 Index]