Comparison {IP}R Documentation

Methods for IP Comparison

Description

Methods for IP binary comparison

Arguments

e1, e2

objects of either class 'IPv4', 'IPv6'or 'IP'

Details

Only the == operator is supported for ranges

Value

a logical vector

Methods

x == y
x != y
x > y
x < y
x >= y
x <= y

Examples

  ##
  ip1 <- ip(c("192.0.0.1", "fd00::1")) + rep(c(0:2),each=2)
  ##
  ip2 <- ip1 + rep(c(1,-1,0), each=2)
  ##
  data.frame(
    ip1, ip2
    , lt = ip1<ip2
    , le = ip1<=ip2
    , eq = ip1==ip2
    , ge = ip1>=ip2
    , gt = ip1>ip2
  )

[Package IP version 0.1.3 Index]