split_ip_network: Splitting a column containing IP address and mask into...

Description Usage Arguments Examples

View source: R/ip_functions.R

Description

This function takes a data.frame/table and a column name that indicates a column containing a combination of ip address and mask (e.g. '192.168.1.101/16') and splits this column into two separate columns. Returns a data.table.

Usage

1
split_ip_network(dt, net_name)

Arguments

dt:

data.frame or data.table

net_name:

character indicating the name of the column containing the ip address and mask

Examples

1
2
fake_dt <- data.table::data.table(ip = c('192.168.1.101/16', '10.10.2.201/24'), b = 1:2)
split_ip_network(fake_dt, 'ip')

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