maskIP: Converting an IP Address based on its mask

Description Usage Arguments Examples

Description

This function takes in an ip address and a mask length (number of bits) and converts the IP address to its form for the that mask length.

Usage

1
maskIP(ipAddr, maskLen, fieldBits=8, fieldSep=".")

Arguments

ipAddr:

character form of the ip address to be converted

maskLen:

integer indicating the mask length to which the ip address should be converted

fieldBits:

integer indicating the number of bits in each field

fieldSep:

character indicating what should be used to separate fields

Examples

1
maskIP ("192.7.16.42", 16)  #returns "192.7.0.0"

zbeaver4/beavR documentation built on May 4, 2019, 9:12 p.m.