Learn R Programming

getip (version 0.1-4)

validip: validip

Description

Check if a string is a valid IP address. Currently only IPv4 addresses are supported.

Usage

validip(ip)

Value

Returns TRUE if the input is a potentially valid IP address, and FALSE otherwise.

Arguments

ip

A string or vector of strings.

Details

This function is not like a 'ping'. It merely checks if the string is correctly formatted and could theoretically be a valid IP address.

Examples

Run this code
library(getip)

validip(c("192.168.1.1", "700.168.1.1"))

Run the code above in your browser using DataLab