powered by
sample_ipv4() and sample_ipv6() sample from the entire address space; sample_network() samples from a specific network.
sample_ipv4()
sample_ipv6()
sample_network()
sample_ipv4(size, ..., replace = FALSE)sample_ipv6(size, ..., replace = FALSE)sample_network(x, size, ..., replace = FALSE)
sample_ipv6(size, ..., replace = FALSE)
sample_network(x, size, ..., replace = FALSE)
An ip_address vector
ip_address
Integer specifying the number of addresses to return
These dots are for future extensions and must be empty.
Should sampling be with replacement? (default: FALSE)
FALSE
An ip_network scalar
ip_network
Use seq.ip_network() to generate all addresses in a network.
seq.ip_network()
sample_ipv4(5) sample_ipv6(5) sample_network(ip_network("192.168.0.0/16"), 5) sample_network(ip_network("2001:db8::/48"), 5)
Run the code above in your browser using DataLab